T
Timo Nentwig
Hi!
Why does the following code throw an NullPointerException at node.detach()?
Document doc = reader.read(new StringReader(string));
Node article = doc.selectSingleNode(xpath);
article.accept(new VisitorSupport()
{
public void visit(Element node)
{
if (node.getName().equalsIgnoreCase("script"))
node.detach();
}
});
TIA
Timo
Why does the following code throw an NullPointerException at node.detach()?
Document doc = reader.read(new StringReader(string));
Node article = doc.selectSingleNode(xpath);
article.accept(new VisitorSupport()
{
public void visit(Element node)
{
if (node.getName().equalsIgnoreCase("script"))
node.detach();
}
});
TIA
Timo