Browsers have a DOMParser object that will allow you to make that conversion. Once you have the XML data as an XML DOM, you can then use the same commands you use to manipulate an HTML DOM to work with the XML data.
When you first start learning to program, your initial focus is on the language. You learn the syntax and the structure. Once you become comfortable and able to put statements together to solve programming problems, you are then free to think more about programming.
As experienced programmers have thought about the best ways to approach the building of an application or the best way to solve a particular problem, they have developed paradigms and design patterns. The smart developers draw on this expertise to improve their own programming skills by adopting paradigms and design patterns.
A paradigm is simply a style or an approach to programming. For example, Object Oriented programming is a paradigm. If you follow this paradigm you use objects to approach the overall program. The objects contain data and behaviors and you connect them in logical ways to successfully solve the task at hand.
Now a design pattern is a tried and tested solution to a common programming pattern. It could be considered a best practice. If you approach a program using an Object Oriented paradigm, there are a number of design patterns you can then draw on to solve specific problems.
I really like this quote by Angus Croll:
In these two tutorials I have tried to first explain prototype in a way that will make sense. And then I delve into three techniques for setting the prototype of an object.
If you have not watched these two tutorials yet, first watch the tutorial that explains prototypes.
Then you can watch how to set the prototype.
For me recursion is one of those concepts that took me a while to grasp. You are accomplishing the same type of thing that is accomplished with a loop, but it is not as easy to understand.
I recently did a tutorial on recursion. It uses a simple example to help you see what is going on with a recursive function. Take a look.
There are certain situations where recursion is very helpful; mainly working with a tree structure. I have used it a lot in the past with XML data. I don’t deal with XML data quite as much anymore, but I still find other tree structures where it is helpful.
Is recursion something you use? In what situations have you used it?