|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 DOMDocument
public Document getOriginalDocument()
DOMDocument
getOriginalDocument
in interface DOMDocument
public List<Node> getNodes(String xPath)
DOMDocument
getNodes
in interface DOMDocument
xPath
- a valid XPath
public Node getNode(String xPath)
DOMDocument
getNode
in interface DOMDocument
xPath
- a valid XPath.
null
if nothing found.public void addAttribute(String xPath, String attrName, String attrValue)
DOMDocument
addAttribute
in interface DOMDocument
xPath
- 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 DOMDocument
attrName
- 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 |