edu.wisc.ssec.mcidasv.util
Class XmlUtil

java.lang.Object
  extended by ucar.unidata.xml.XmlUtil
      extended by edu.wisc.ssec.mcidasv.util.XmlUtil

public abstract class XmlUtil
extends XmlUtil

A collection of utilities for XML..


Field Summary
 
Fields inherited from class ucar.unidata.xml.XmlUtil
NULL_STRING, TAG_WILDCARD, XML_HEADER
 
Constructor Summary
XmlUtil()
           
 
Method Summary
static List<String> findDescendantNamesWithSeparator(Node parent, String tag, String separator)
          Find all of the descendant elements of the given parent Node whose tag name.equals the given tag.
private static void findDescendantNamesWithSeparator(Node parent, String tag, String descendants, String separator, List<String> found)
          Find all of the descendant elements of the given parent Node whose tag name equals the given tag.
static Element getElementAtNamedPath(Node parent, List<String> nameList)
          Find the element described by nameList (path)
static Element getMakeElementAtNamedPath(Node parent, List<String> nameList, String tagName, boolean makeNew)
          Find the element described by nameList (path)
static Element makeElementAtNamedPath(Node parent, List<String> nameList, String tagname)
          Make the element described by nameList (path)
static void printNode(Node parent)
          Print all the attributes of the given node
 
Methods inherited from class ucar.unidata.xml.XmlUtil
addChildren, appendCdata, appendCdataBytes, attr, attr, attrs, attrs, attrs, attrs, attrs, calculateRFC2104HMAC, closeTag, comment, create, create, create, create, create, create, create, create, create, create, create, create, createCDataNode, decodeBase64, encodeBase64, encodeString, ensureAttributes, findAncestor, findChild, findChildRecurseUp, findChildren, findChildrenRecurseUp, findDescendant, findDescendantFromPath, findDescendants, findDescendantsFromPath, findElement, findElement, findRoot, findUrlRefNode, findUrlRefNode, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeFromTree, getAttributeFromTree, getAttributeFromTree, getAttributeFromTree, getAttributesFromTree, getAttributesFromTree, getCdata, getChildText, getDocument, getDocument, getDocument, getElement, getElements, getElements, getElements, getFirstChild, getGrandChildren, getGrandChildText, getGrandChildText, getGrandChildValue, getHeader, getListOfElements, getLocalName, getNodeName, getRoot, getRoot, getRoot, hasAttribute, isFullyQualified, isTag, main, makeCDataNode, makeCDataNode, makeDocument, mergeAttributes, openTag, openTag, quote, removeChildren, setAttribute, setAttributes, tag, tag, toHtml, toString, toString, toString, toString, toString, toStringNoChildren, toStringWithHeader, toStringWithHeader, toStringWithHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtil

public XmlUtil()
Method Detail

printNode

public static void printNode(Node parent)
Print all the attributes of the given node

Parameters:
parent -

findDescendantNamesWithSeparator

public static List<String> findDescendantNamesWithSeparator(Node parent,
                                                            String tag,
                                                            String separator)
Find all of the descendant elements of the given parent Node whose tag name.equals the given tag.

Parameters:
parent - The root of the xml dom tree to search.
tag - The tag name to match.
Returns:
The list of descendants that match the given tag.

findDescendantNamesWithSeparator

private static void findDescendantNamesWithSeparator(Node parent,
                                                     String tag,
                                                     String descendants,
                                                     String separator,
                                                     List<String> found)
Find all of the descendant elements of the given parent Node whose tag name equals the given tag.

Parameters:
parent - The root of the xml dom tree to search.
tag - The tag name to match.
found - The list of descendants that match the given tag.

getElementAtNamedPath

public static Element getElementAtNamedPath(Node parent,
                                            List<String> nameList)
Find the element described by nameList (path)

Parameters:
parent -
nameList -
Returns:

makeElementAtNamedPath

public static Element makeElementAtNamedPath(Node parent,
                                             List<String> nameList,
                                             String tagname)
Make the element described by nameList (path)

Parameters:
parent -
nameList -
Returns:

getMakeElementAtNamedPath

public static Element getMakeElementAtNamedPath(Node parent,
                                                List<String> nameList,
                                                String tagName,
                                                boolean makeNew)
Find the element described by nameList (path)

Parameters:
parent -
nameList -
Returns: