|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.wcm.toolkit.server.util.xml.XPathUtil
The XPathUtil class provides convenience methods for getting or removing XML nodes using XPath syntax. This class is using Jaxen.
Field Summary | |
static java.util.Map |
WCM_NS
|
Method Summary | |
static org.w3c.dom.NodeList |
createNodeList(java.util.List nodes)
This method takes a List of Node object and returns a NodeList object. |
static org.w3c.dom.Node |
removeNode(org.w3c.dom.Node contextNode,
java.lang.String xPath,
java.util.Map namespaces)
Remove the XML node specified by the xPath string from the context node. |
static void |
removeNodes(org.w3c.dom.Node contextNode,
java.lang.String xPath,
java.util.Map namespaces)
Remove the entire nodelist specified by the xPath string from the context node. |
static java.util.List |
selectNodes(org.w3c.dom.Node contextNode,
java.lang.String xPath,
java.util.Map namespaces)
Get a XML nodelist using the specified xPath string. |
static org.w3c.dom.Node |
selectSingleNode(org.w3c.dom.Node contextNode,
java.lang.String xPath,
java.util.Map namespaces)
Get a single XML node using the specified xPath string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.Map WCM_NS
Method Detail |
public static org.w3c.dom.Node selectSingleNode(org.w3c.dom.Node contextNode, java.lang.String xPath, java.util.Map namespaces) throws java.lang.Exception
contextNode
- The node to start searching from.xPath
- A valid XPath string.namespaces
- A map of prefixes to URIs
java.lang.Exception
public static java.util.List selectNodes(org.w3c.dom.Node contextNode, java.lang.String xPath, java.util.Map namespaces) throws java.lang.Exception
contextNode
- The node to start searching from.xPath
- A valid XPath string.namespaces
- A map of prefixes to URIs
java.lang.Exception
public static org.w3c.dom.Node removeNode(org.w3c.dom.Node contextNode, java.lang.String xPath, java.util.Map namespaces) throws java.lang.Exception
contextNode
- The node to start searching for the specified node to be removed.xPath
- A valid XPath string.namespaces
- A map of prefixes to URIs
java.lang.Exception
public static void removeNodes(org.w3c.dom.Node contextNode, java.lang.String xPath, java.util.Map namespaces) throws java.lang.Exception
contextNode
- The node to start searching from for the specified nodelist.xPath
- A valid XPath string.namespaces
- A map of prefixes to URIs
java.lang.Exception
public static org.w3c.dom.NodeList createNodeList(java.util.List nodes)
nodes
- List of Node objects. Null value is not supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |