W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

JTidy DOM structure

From: <dyeh@us.ibm.com>
Date: Thu, 20 Jul 2000 14:27:56 -0700
To: HTMLTidy <html-tidy@w3.org>
Message-ID: <87256922.0075EA97.00@d53mta03h.boulder.ibm.com>


I have been trying to operate directly on the DOM tree that JTidy produces
with the parse or parseDOM method.  I find that this usually causes a null
pointer exception with programs that usually work on DOM trees constructed
by XML parsers.  I chased down the source and it seems to be that JTidy
produces Text nodes that return null when you call getNodeValue().  XML
parsers always seem to produce some String object here.  Basically you have
to modify your programs to check for this condition and they seem to run
fine.


David Yeh
Received on Thursday, 20 July 2000 17:28:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT