Hiya Bit of a newby question probably. I have an xml doument which has been parsed by DOM. The document looks like this: <catalog> <book> stuff here </book> </catalog> The DOM tree appears to be as follows: catalog / | \ #text book #text I'm sure I have read that by inlcuding a DOCTYPE in the xml document, linking to a DTD, I can get rid of the unnecessary #text elements in the DOM tree, but this does not seem to work. Any suggestions would be *very* much appreciated as I have already wasted a day on this! Doh!