|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.any23.validator.DefaultDOMDocument
public class DefaultDOMDocument
This class wraps the DOM document.
| Constructor Summary | |
|---|---|
DefaultDOMDocument(URI documentURI,
Document document)
|
|
| Method Summary | |
|---|---|
void |
addAttribute(String xPath,
String attrName,
String attrValue)
Adds an attribute to a node addressed by the given XPath. |
URI |
getDocumentURI()
|
Node |
getNode(String xPath)
Returns the node addressed by the given XPath, if more then one an exception will be raised. |
List<Node> |
getNodes(String xPath)
Returns the list of nodes addressed by the given XPath. |
List<Node> |
getNodesWithAttribute(String attrName)
Returns all the nodes declaring an attribute with the specified name. |
Document |
getOriginalDocument()
Returns the original document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultDOMDocument(URI documentURI,
Document document)
| Method Detail |
|---|
public URI getDocumentURI()
getDocumentURI in interface DOMDocumentpublic Document getOriginalDocument()
DOMDocument
getOriginalDocument in interface DOMDocumentpublic List<Node> getNodes(String xPath)
DOMDocument
getNodes in interface DOMDocumentxPath - a valid XPath
public Node getNode(String xPath)
DOMDocument
getNode in interface DOMDocumentxPath - a valid XPath.
null if nothing found.
public void addAttribute(String xPath,
String attrName,
String attrValue)
DOMDocument
addAttribute in interface DOMDocumentxPath - the XPath pointing the node.attrName - the name of the attribute.attrValue - the value of the attribute.public List<Node> getNodesWithAttribute(String attrName)
DOMDocument
getNodesWithAttribute in interface DOMDocumentattrName - name of attribute to use for filtering.
null if no matches found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||