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

java.lang.Object
  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

public class WcmXPathUtil
extends java.lang.Object


Constructor Summary
WcmXPathUtil()
          Deprecated. Utility to get, clone, remove node from and add node to an XML Document using XPath.
 
Method Summary
static 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.
static 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.
static 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.
static 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.
static 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.
static 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.
static 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

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

Method Detail

getNode

public static org.w3c.dom.Node getNode(org.w3c.dom.Node contextNode,
                                       java.lang.String xPath,
                                       org.w3c.dom.Node namespaceNode)
                                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

public static org.w3c.dom.NodeList getNodeList(org.w3c.dom.Node contextNode,
                                               java.lang.String xPath,
                                               org.w3c.dom.Node namespaceNode)
                                        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

public static org.w3c.dom.Node addNode(org.w3c.dom.Node contextNode,
                                       java.lang.String xPath,
                                       org.w3c.dom.Node newNode,
                                       org.w3c.dom.Node namespaceNode)
                                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

public static 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)
                                         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

public static org.w3c.dom.Node removeNode(org.w3c.dom.Node contextNode,
                                          java.lang.String xPath,
                                          org.w3c.dom.Node namespaceNode)
                                   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

public static void removeNodeList(org.w3c.dom.Node contextNode,
                                  java.lang.String xPath,
                                  org.w3c.dom.Node namespaceNode)
                           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

public static org.w3c.dom.Node cloneNode(org.w3c.dom.Node contextNode,
                                         java.lang.String xPath,
                                         org.w3c.dom.Node namespaceNode)
                                  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


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.