Modifier and Type | Field and Description |
---|---|
private org.dom4j.Document |
document |
private String |
documentType |
private Map<String,String> |
namespaceMap |
private URL |
xmlUrl |
Constructor and Description |
---|
XMLReader(String type,
File file) |
XMLReader(String type,
URL url) |
Modifier and Type | Method and Description |
---|---|
void |
addNamespaceMapping(String elementName,
String uri) |
private org.dom4j.XPath |
createXPath(String xpathExpr) |
String |
getDefaultNamespaceURI() |
org.dom4j.Element |
getElement(String xpathExpr) |
List<org.dom4j.Element> |
getElementList(String xpathExpr) |
List<String> |
getElementListText(String xpathExpr) |
String |
getElementText(org.dom4j.Node context,
String xpathExpr) |
String |
getElementText(String xpathExpr) |
boolean |
hasElement(String xpathExpr) |
private void |
init(String type,
URL url) |
void |
removeNamespaces()
Remove namespaces from entire document.
|
void |
removeNamespaces(org.dom4j.Element elem)
Remove namespaces from element recursively.
|
private String documentType
private org.dom4j.Document document
private Map<String,String> namespaceMap
public XMLReader(String type, File file) throws XMLException
XMLException
public XMLReader(String type, URL url) throws XMLException
XMLException
private void init(String type, URL url) throws XMLException
XMLException
public String getDefaultNamespaceURI()
public void addNamespaceMapping(String elementName, String uri)
public org.dom4j.Element getElement(String xpathExpr) throws XMLException
XMLException
private org.dom4j.XPath createXPath(String xpathExpr)
public boolean hasElement(String xpathExpr) throws XMLException
XMLException
public void removeNamespaces()
public void removeNamespaces(org.dom4j.Element elem)
public String getElementText(org.dom4j.Node context, String xpathExpr) throws XMLException
XMLException
public String getElementText(String xpathExpr) throws XMLException
XMLException
public List<org.dom4j.Element> getElementList(String xpathExpr) throws XMLException
XMLException
public List<String> getElementListText(String xpathExpr) throws XMLException
XMLException
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.