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: " + commentList.size());
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?
Thanks.
David R. Patterson