Page 1 of 1

DOM and XSLT

Posted: Wed Sep 06, 2006 9:13 pm
by Ambush Commander
For a somewhat practical project that I'm doing, I've decided to really learn how to use DOM and XSLT. And, as of right now, I'd like to say: "How delightful!" Editing XML docs with DOM is great fun and very easy.

Of course, I've been doing very simple stuff: mapping objects to XML files. Any people have helpful tips or pointers for either of these technologies?

Posted: Wed Sep 06, 2006 9:28 pm
by alex.barylski
Best tip I can think of when using a DOM...

Whenever you have garbage XHTML or HTML, etc...you can use the DOM to load a non-valid document and traverse the tree outputting clean XHTML trans/strict, HTML, etc...

It's very handy in those situations :P

So many people whizz right by this fact and start using crazy regex to rewrite or fix invalid markup when the answer is so much easier when using a DOM.

Cheers :)