| 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
XMLExceptionpublic XMLReader(String type, URL url) throws XMLException
XMLExceptionprivate void init(String type, URL url) throws XMLException
XMLExceptionpublic String getDefaultNamespaceURI()
public void addNamespaceMapping(String elementName, String uri)
public org.dom4j.Element getElement(String xpathExpr) throws XMLException
XMLExceptionprivate org.dom4j.XPath createXPath(String xpathExpr)
public boolean hasElement(String xpathExpr) throws XMLException
XMLExceptionpublic void removeNamespaces()
public void removeNamespaces(org.dom4j.Element elem)
public String getElementText(org.dom4j.Node context, String xpathExpr) throws XMLException
XMLExceptionpublic String getElementText(String xpathExpr) throws XMLException
XMLExceptionpublic List<org.dom4j.Element> getElementList(String xpathExpr) throws XMLException
XMLExceptionpublic List<String> getElementListText(String xpathExpr) throws XMLException
XMLExceptionCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.