com.filenet.eforms.api
Class P8XMLUtil
- java.lang.Object
com.filenet.eforms.api.P8XMLUtil
- public class P8XMLUtil
- extends java.lang.Object
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
addChildren(java.util.ArrayList childList,org.w3c.dom.Node parent,java.lang.String nameToFind)
Helper method to add any child nodes that match the passed in tag name to the child list.
|
|
getChildNode(org.w3c.dom.Node parent,java.lang.String nameToFind)
Helper method to find a child node under a parent.
|
|
getChildNodeText(org.w3c.dom.Node parent,java.lang.String nameToFind)
Helper method to find a child node under a parent and return it's text value.
|
|
getChildNodeWithValue(java.util.ArrayList childList,java.lang.String nameToFind,java.lang.String valueToFind)
Helper method to find a child node in a list of node that has a particular value.
|
|
getDocumentFromInputStream(java.io.InputStream inputStream)
|
|
getNodeText(org.w3c.dom.Node node)
Helper method to get the text value of a specified node.
|
|
getSelectNode(org.w3c.dom.Node parent,java.lang.String pathToNode)
Helper method to find a child node under a parent.
|
|
getSelectNodeList(org.w3c.dom.Node parent,java.lang.String pathToNode)
Helper method to retrieve an array list of children under a parent node.
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail
getDocumentFromInputStream
- public static org.w3c.dom.Document getDocumentFromInputStream( java.io.InputStream inputStream)
- throws java.io.IOException
- org.xml.sax.SAXException
- javax.xml.parsers.ParserConfigurationException
Throws:
java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationExceptiongetChildNode
- public static org.w3c.dom.Node getChildNode( org.w3c.dom.Node parent,
- java.lang.String nameToFind)
- throws java.lang.Exception
Helper method to find a child node under a parent. Does not use xpath!
Parameters:
parent - Node holding the parent nameToFind - String holding the XML element tag name to look for under the parent node. Returns:
Node object of child that matches the passed in tag name.
Throws:
java.lang.Exception - If there are problems retrieving data or with an invalid parameter. getSelectNode
- public static org.w3c.dom.Node getSelectNode( org.w3c.dom.Node parent,
- java.lang.String pathToNode)
- throws java.lang.Exception
Helper method to find a child node under a parent. Does not use xpath!
Parameters:
parent - Node holding the parent pathToNode - String holding simple XML tag path (ie: "propdesc/symname"). Does not
use xpath, and therfore does not handle queries (ie: "propdesc[symname = 'myprop']. Returns:
Node object of child that matches the passed in tag name.
Throws:
java.lang.Exception - If there are problems retrieving data or with an invalid parameter. getChildNodeText
- public static java.lang.String getChildNodeText( org.w3c.dom.Node parent,
- java.lang.String nameToFind)
- throws java.lang.Exception
Helper method to find a child node under a parent and return it's text value. Does not use xpath!
Parameters:
parent - Node holding the parent nameToFind - String holding the XML element tag name to look for under the parent node. Returns:
String text value of child node to find.
Throws:
java.lang.Exception - If there are problems retrieving data or with an invalid parameter. getNodeText
- public static java.lang.String getNodeText( org.w3c.dom.Node node)
Helper method to get the text value of a specified node.
Parameters:
node - Node object to find value Returns:
String text value of specified node
getSelectNodeList
- public static java.util.ArrayList getSelectNodeList( org.w3c.dom.Node parent,
- java.lang.String pathToNode)
- throws java.lang.Exception
Helper method to retrieve an array list of children under a parent node. Does not use xpath.
Parameters:
parent - Node holding the parent pathToNode - String holding simple XML tag path (ie: "propdesc/symname"). Does not
use xpath, and therfore does not handle queries (ie: "propdesc[symname = 'myprop']. Returns:
ArrayList of child Node objects.
Throws:
java.lang.Exception - If there are problems retrieving data or with an invalid parameter. getChildNodeWithValue
- public static org.w3c.dom.Node getChildNodeWithValue( java.util.ArrayList childList,
- java.lang.String nameToFind,
- java.lang.String valueToFind)
- throws java.lang.Exception
Helper method to find a child node in a list of node that has a particular value. Does not use xpath!
Parameters:
childList - ArrayList holding the child node to look through nameToFind - String holding the XML element tag name to look for under the parent node. valueToFind - String holding the XML element value to look for under the child node mathcing the name. Returns:
Node object of child that matches the passed in tag name.
Throws:
java.lang.Exception - If there are problems retrieving data or with an invalid parameter. addChildren
- protected static void addChildren( java.util.ArrayList childList,
- org.w3c.dom.Node parent,
- java.lang.String nameToFind)
Helper method to add any child nodes that match the passed in tag name to the child list.
Parameters:
childList - ArrayList holding the current list of children parent - Node to for children thath match the specified tag. nameToFind - String holding XML element name to look for.