List of usage examples for org.w3c.dom Document getNodeType
public short getNodeType();
From source file:org.codelibs.robot.transformer.impl.XmlTransformer.java
protected NodeList getNodeList(final Document doc, final String xpath) throws TransformerException { final DefaultPrefixResolver prefixResolver = new DefaultPrefixResolver( doc.getNodeType() == Node.DOCUMENT_NODE ? doc.getDocumentElement() : doc); return getXPathAPI().eval(doc, xpath, prefixResolver).nodelist(); }