After studying the DOM (document object model) for a couple of weeks it is not so difficult after all. In fact, the DOM makes things very easy by breaking down the XML into sections (trees) by their order in the document. Once you get the server to pull the XML from the API's server the rest is surprisingly easy.
Once the code is pulled up from the server onto your server you just use Javascript to parse the XML. For instance, lets say you have a
For further insight please check out the following links.
IBM Article
Cover Pages
The DOM may seem intimidating at first but don't let it scare you. It really helps to break down the DOM into little pieces. Do each section of your code, that way the code is not huge and does not scare you away with pages of code. Finally I can say this has been a good week of programming!!
There you go Jeremy you finally understood what it really does and how one has to use it. I liked DOM so much that I used it in my Individual Iteration 2. Way to Go Jeremy!
ReplyDelete