From: Stephen M. <ste...@gm...> - 2007-12-26 19:42:20
|
I am trying to remove the tag <HEAD> </HEAD> from an HTML fragment. I tried: org.cyberneko.html.filters.ElementRemover er = new org.cyberneko.html.filters.ElementRemover(); er.removeElement( "head" ); org.apache.xerces.xni.parser.XMLDocumentFilter[] filters = { er }; parser.setProperty( "http://cyberneko.org/html/properties/filters", filters ); But this seems to remove everything. Is there anyway to say accept everything except <HEAD> ? -Thanks Steve More |