Using the DOM in Your Web Applications

Posted by Maciek Wed, 20 Sep 2006 17:13:26 GMT

The DOM (Document Object Model) can be a clear and useful way to represent and interact with XML documents. It can also be a rather obtuse and un-obvious way to work with data when you first come in contact with it. In spite of some of its more difficult parts (especially as one digs into DOM Level 2 and 3) , the core DOM API is fairly consistent. It is this consistency that offers programmers some of DOM’s great strengths: operational sameness from language-to-language and system-to-system, schema-to-schema—and, to a lesser extent, browser to browser. As one works with it, however, one comes to realize that DOM is only a piece of a puzzle that fits into a greater whole in the XML world, and this consistency is only part of that larger philosophy that embodies XML.

Read more...

Posted in , , ,  | Tags , , ,  | 1 comment | no trackbacks

PHP5 XML Problems & Solutions

Posted by Maciek Wed, 17 Aug 2005 03:37:00 GMT

PHP5 DOM can be tricky at first and hard to remember every time. I always find myself digging around for code I wrote in the past to accomplish a particular trick that I know I can do in theory, if I could just remember how..

Some collected problems and solutions follow in no particular order. This is an evolving document, and I will add solutions to problems as I or my friends come across them. If you have any cool tricks or solutions, please leave a comment and let me know. For the example code, you will require at least PHP5 with the latest libxml2 (minimum) installed.

Read more...

Posted in ,  | no comments | no trackbacks