DocumentBuilder - setNamespaceAware - setNamespaceAware cannot resolve method

i'm tryng to set NamespaceAware(true) using the setNamespaceAware method of javax.xml.parsers.DocumentBuilder, but i find the following error:

Error:(31, 16) java: cannot find symbol

symbol: method setNamespaceAware(boolean)

location: variable builder of type javax.xml.parsers.DocumentBuilder

Code:

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

builder.setNamespaceAware(true);

(of course i added: import javax.xml.parsers.DocumentBuilderFactory and import org.w3c.dom.Document;)

Thanks...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts