Anyone who has followed my blog knows that I use php to parse my xml data by simply putting my data into an indexed array or an associative array and then manipulating the data as you would any other arrayed data (see http://clarkepeters.wordpress.com/2007/09/02/parsing-without-the-dom-or-simplexml-in-php/. I’m not advocating, however, that this is the best method for dealing with xml–it’s not. The DOM or SimpleXml or other parser’s are designed specifically to handle xml. For anyone who has the time and inclination, learn how to parse with an xml parser. That is especially important when your handling files from sources that are not your own.
One thing you will notice, however, is that as you become more versed in xforms, you’ll find less and less need to rely on the DOM for data manipulation. One might, then, want to get well versed in both xpath and xforms before putting time into learning how to manipulate data with the DOM. (Come to think of it, I think you can do just about everything you need using PHP with Xpath, so that may just obviate the need for the DOM–but I’ll let some expert comment on that if they like).
[ note: Xforms uses xpath expressions; however, don't confuse learning xpath with learning xslt which also relies on xpath expressions. check out http://www.w3schools.com/xforms/xforms_xpath.asp]
I handle my data with arrays simply because I am a professor of English who has a lot of demands on his time that aren’t computer related, and since I’m handling my own personal data when programming, and I know my own schema, I have simply found it the best way to get involved with xforms and xml now without having to learn anything other than basic DOM manipulation (I’m also an old time procedural language fella’ who tends to think in old ways, so it is only natural that I would take a procedural approach to doing things until I can master the more declarative approaches). And I wish like heck I had more time to get all I could out of xforms and xpath, the more I learn about xforms, the more I see it’s power and simplicity.