This project has retired. For details please refer to its
Attic page.
XMLReader
org.apache.maven.archiva.xml
Class XMLReader
java.lang.Object
org.apache.maven.archiva.xml.XMLReader
public class XMLReader
- extends java.lang.Object
XMLReader - a set of common xml utility methods for reading content out of an xml file.
Constructor Summary |
XMLReader(java.lang.String type,
java.io.File file)
|
XMLReader(java.lang.String type,
java.net.URL url)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLReader
public XMLReader(java.lang.String type,
java.io.File file)
throws XMLException
- Throws:
XMLException
XMLReader
public XMLReader(java.lang.String type,
java.net.URL url)
throws XMLException
- Throws:
XMLException
getDefaultNamespaceURI
public java.lang.String getDefaultNamespaceURI()
addNamespaceMapping
public void addNamespaceMapping(java.lang.String elementName,
java.lang.String uri)
getElement
public org.dom4j.Element getElement(java.lang.String xpathExpr)
throws XMLException
- Throws:
XMLException
hasElement
public boolean hasElement(java.lang.String xpathExpr)
throws XMLException
- Throws:
XMLException
removeNamespaces
public void removeNamespaces()
- Remove namespaces from entire document.
removeNamespaces
public void removeNamespaces(org.dom4j.Element elem)
- Remove namespaces from element recursively.
getElementText
public java.lang.String getElementText(org.dom4j.Node context,
java.lang.String xpathExpr)
throws XMLException
- Throws:
XMLException
getElementText
public java.lang.String getElementText(java.lang.String xpathExpr)
throws XMLException
- Throws:
XMLException
getElementList
public java.util.List<org.dom4j.Element> getElementList(java.lang.String xpathExpr)
throws XMLException
- Throws:
XMLException
getElementListText
public java.util.List<java.lang.String> getElementListText(java.lang.String xpathExpr)
throws XMLException
- Throws:
XMLException