[jdom-interest] Getting comments in a Document
dpatterson at i-a-i.com
Wed May 10 14:00:23 PDT 2006
This may be the wrong forum, but I hope someone knows this answer. I'm using
Java 1.4 with the default parser and JDOM. I process an XML document that
has comments in it. After getting a good Document object, my code has:
Filter comments = new ContentFilter( ContentFilter.COMMENT );
List commentList = newPrelDoc.getContent( comments );
System.out.println( "commentList size is: " +
And, I'm getting a value of zero as the size. (A) Is this the right way to
use this filter? (B) Is it known that the default parser blocks comments?
(C) Is there a magic incantation to get it to pass comments along? (D) Does
a different parser pass comments through?
David R. Patterson
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest