|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.xml.dom4j.Dom4jXmlObject
public class Dom4jXmlObject
A dom4j (http://www.dom4j.org) implementation of XmlObject.
| Constructor Summary | |
|---|---|
Dom4jXmlObject(Node node)
Constructs a new xml object based on a dom4j Node. |
|
Dom4jXmlObject(Node node,
Map<String,String> namespaces)
Constructs a new xml object based on a dom4j Node. |
|
| Method Summary | |
|---|---|
boolean |
canCompileXpath()
Return true since dom4j supports xml compilation. |
XmlXPathExpression |
compile(String path)
Compiles the given xpath expression using dom4j DefaultXPath. |
String |
getName()
Returns the dom4j node name. |
Map<String,String> |
getNamespaces()
Returns a lookup map for namespaces (prefix to uri). |
Node |
getNode()
Returns the dom4j Node that this xml object wraps. |
String |
getValue()
Returns the dom4j node text. |
XmlObject[] |
selectPath(String path)
Returns a list of xml objects matching the given xpath expression. |
void |
setNamespaces(Map<String,String> namespaces)
Sets a lookup map for given namespaces (prefix to uri). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dom4jXmlObject(Node node)
Node.
node - The node to construct the dom4j xml object with
public Dom4jXmlObject(Node node,
Map<String,String> namespaces)
Node.
node - The node to construct the dom4j xml object with| Method Detail |
|---|
public void setNamespaces(Map<String,String> namespaces)
XmlObject
setNamespaces in interface XmlObjectpublic Map<String,String> getNamespaces()
XmlObject
getNamespaces in interface XmlObjectpublic String getName()
getName in interface XmlObjectpublic String getValue()
getValue in interface XmlObject
public XmlObject[] selectPath(String path)
throws Exception
XmlObject
selectPath in interface XmlObjectpath - The xpath expression
Exceptionpublic boolean canCompileXpath()
true since dom4j supports xml compilation.
canCompileXpath in interface XmlObjectpublic XmlXPathExpression compile(String path)
DefaultXPath.
compile in interface XmlObjectpath - The xpath expression
public Node getNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||