com.filenet.wcm.toolkit.server.util.xml

Class WcmXPathUtil

  1. java.lang.Object
  2. extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXPathUtil

Deprecated. use XPathUtil. This one is obsolete and inefficient The WcmXPathUtil class provides convenience methods for getting, updating, adding or removing XML nodes using XPath syntax. This class only calls methods of XPathUtil
  1. public class WcmXPathUtil
  2. extends java.lang.Object

Constructor Summary

Constructor and Description
WcmXPathUtil()
Deprecated. Utility to get, clone, remove node from and add node to an XML Document using XPath.

Method Summary

Modifier and Type Method and Description
  1. static
  2. org.w3c.dom.Node
addNode(org.w3c.dom.Node contextNode,java.lang.String xPath,org.w3c.dom.Node newNode,org.w3c.dom.Node namespaceNode)
Deprecated. Add a new node to the context node at the specified xPath location.
  1. static
  2. org.w3c.dom.Node
cloneNode(org.w3c.dom.Node contextNode,java.lang.String xPath,org.w3c.dom.Node namespaceNode)
Deprecated. Clone the node specified by the xPath string.
  1. static
  2. org.w3c.dom.Node
getNode(org.w3c.dom.Node contextNode,java.lang.String xPath,org.w3c.dom.Node namespaceNode)
Deprecated. Get a single XML node using the specified xPath string.
  1. static
  2. org.w3c.dom.NodeList
getNodeList(org.w3c.dom.Node contextNode,java.lang.String xPath,org.w3c.dom.Node namespaceNode)
Deprecated. Get a XML nodelist using the specified xPath string.
  1. static
  2. org.w3c.dom.Node
insertNodeBefore(org.w3c.dom.Node contextNode,java.lang.String xPath,java.lang.String defaultxPath,org.w3c.dom.Node newNode,org.w3c.dom.Node namespaceNode)
Deprecated. Insert the new node into the context node right before the node specified by xPath string.
  1. static
  2. org.w3c.dom.Node
removeNode(org.w3c.dom.Node contextNode,java.lang.String xPath,org.w3c.dom.Node namespaceNode)
Deprecated. Remove the XML node specified by the xPath string from the context node.
  1. static
  2. void
removeNodeList(org.w3c.dom.Node contextNode,java.lang.String xPath,org.w3c.dom.Node namespaceNode)
Deprecated. Remove the entire nodelist specified by the xPath string from the context node.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WcmXPathUtil

  1. public WcmXPathUtil()
Deprecated.
Utility to get, clone, remove node from and add node to an XML Document using XPath.

Method Detail

getNode

  1. public static org.w3c.dom.Node getNode( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. org.w3c.dom.Node namespaceNode)
  4. throws javax.xml.transform.TransformerException
Deprecated.
Get a single XML node using the specified xPath string. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching from.
xPath - A valid XPath string.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
The first node found that matches the xPath, or null.
Throws:
javax.xml.transform.TransformerException

getNodeList

  1. public static org.w3c.dom.NodeList getNodeList( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. org.w3c.dom.Node namespaceNode)
  4. throws javax.xml.transform.TransformerException
Deprecated.
Get a XML nodelist using the specified xPath string. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching from.
xPath - A valid XPath string.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
A nodelist, should never be null.
Throws:
javax.xml.transform.TransformerException

addNode

  1. public static org.w3c.dom.Node addNode( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. org.w3c.dom.Node newNode,
  4. org.w3c.dom.Node namespaceNode)
  5. throws javax.xml.transform.TransformerException
Deprecated.
Add a new node to the context node at the specified xPath location. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching from and add the new node to.
xPath - A valid XPath string.
newNode - The new node to add to the context node at the specified xPath.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
The new node or null.
Throws:
javax.xml.transform.TransformerException

insertNodeBefore

  1. public static org.w3c.dom.Node insertNodeBefore( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. java.lang.String defaultxPath,
  4. org.w3c.dom.Node newNode,
  5. org.w3c.dom.Node namespaceNode)
  6. throws javax.xml.transform.TransformerException
Deprecated.
Insert the new node into the context node right before the node specified by xPath string. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching from and insert the new node to.
xPath - A valid XPath string.
defaultxPath - A valid XPath string.
newNode - The new node to insert to the context node before the node specified by the xPath.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
The new node or null.
Throws:
javax.xml.transform.TransformerException

removeNode

  1. public static org.w3c.dom.Node removeNode( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. org.w3c.dom.Node namespaceNode)
  4. throws javax.xml.transform.TransformerException
Deprecated.
Remove the XML node specified by the xPath string from the context node. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching for the specified node to be removed.
xPath - A valid XPath string.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
The removed node or null.
Throws:
javax.xml.transform.TransformerException

removeNodeList

  1. public static void removeNodeList( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. org.w3c.dom.Node namespaceNode)
  4. throws javax.xml.transform.TransformerException
Deprecated.
Remove the entire nodelist specified by the xPath string from the context node. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching from for the specified nodelist.
xPath - A valid XPath string.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Throws:
javax.xml.transform.TransformerException

cloneNode

  1. public static org.w3c.dom.Node cloneNode( org.w3c.dom.Node contextNode,
  2. java.lang.String xPath,
  3. org.w3c.dom.Node namespaceNode)
  4. throws javax.xml.transform.TransformerException
Deprecated.
Clone the node specified by the xPath string. XPath namespace prefixes are resolved from the namespaceNode.

Parameters:
contextNode - The node to start searching from.
xPath - A valid XPath string.
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
The cloned node or null.
Throws:
javax.xml.transform.TransformerException