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
From the javadoc
HtmlCleaner cleaner = new HtmlCleaner(...);
cleaner.setNamespacesAware(false); // ignore namespace.
claener.clean();
cleaner.createDOM/createJDOM(); // Get the output as you want.
Subscribe to Posts [Atom]