[jdom-interest] remove comments

John C Cartwright John.C.Cartwright at noaa.gov
Tue Aug 24 14:40:44 PDT 2004

Hello All,

I'm using jdom b9 and trying to find a elegant way to remove all comment 
nodes from a document.  I seem to be thrashing about though, and would 
appreciate some direction.

I've been trying approaches like:

       ContentFilter filter =  new ContentFilter();
       List comments = doc.getContent(filter);

but this seems to neither remove the comment, nor are all the comments 
in the list.


-- john

John Cartwright
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6284
John.C.Cartwright at noaa.gov

More information about the jdom-interest mailing list