| java.lang.Object net.firstpartners.nounit.utility.XmlUtil
XmlUtil | public class XmlUtil (Code) | | General XML Utility Functions
|
Method Summary | |
public static Element | findNode(Document inDocumentToSearch, String uniqueIdentifierName, String uniqueIdentifierToFind) | public static HashSet | getAllNodes(Document inXmlDocument) | public static HashMap | getNodeIndex(Document inXmlDocument, String uniqueAttribute) indexes the nodes in the document that is passed in , via a HashMap mapping
mapping is in the format as String , handle to of node
Strings are used as they are better lookup in the hashmap.
Parameters: inXmlDocument - to generated the hashmap from Parameters: uniqueAttribute - to do the index on (i.e. |
findNode | public static Element findNode(Document inDocumentToSearch, String uniqueIdentifierName, String uniqueIdentifierToFind)(Code) | | Search for Nodes within Jdom Document
Parameters: inDocumentToSearch - XML-JDOM Document Parameters: uniqueIdentifierName - we can use to index the document (uniqueattribute like id or name present on the node we are searching for) Parameters: uniqueIdentifierToFind - in the indexed document |
getAllNodes | public static HashSet getAllNodes(Document inXmlDocument)(Code) | | gets all elements in the XML Document Being Passed in
Parameters: inXmlDocument - to generated the hashmap from nodeList containing nodes |
getNodeIndex | public static HashMap getNodeIndex(Document inXmlDocument, String uniqueAttribute)(Code) | | indexes the nodes in the document that is passed in , via a HashMap mapping
mapping is in the format as String , handle to of node
Strings are used as they are better lookup in the hashmap.
Parameters: inXmlDocument - to generated the hashmap from Parameters: uniqueAttribute - to do the index on (i.e. key in HashMap). Examplesof uniqueAttributes are id's or names. HashMap containing mappings |
|
|