Monday, May 19, 2008

Remove the namespace attribute from html

If you are constructing xml document from html and the original html has unwanted namespace attribute, you can easily remove it with HtmlCleaner.

From the javadoc

HtmlCleaner cleaner = new HtmlCleaner(...);
cleaner.setNamespacesAware(false); // ignore namespace.
claener.clean();
cleaner.createDOM/createJDOM(); // Get the output as you want.

Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]