edu.ucsb.nceas.morpho.util
Class XMLUtil

java.lang.Object
  extended byedu.ucsb.nceas.morpho.util.XMLUtil

public class XMLUtil
extends java.lang.Object


Constructor Summary
XMLUtil()
           
 
Method Summary
static java.lang.String getDOMTreeAsString(org.w3c.dom.Node node)
           
static java.lang.String normalize(java.lang.Object ss)
          Normalizes the given string.
static void print(org.w3c.dom.Node node, java.io.PrintWriter out)
          This method can 'print' any DOM subtree.
protected static org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
          Returns a sorted list of attributes.
 
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

normalize

public static java.lang.String normalize(java.lang.Object ss)
Normalizes the given string.


getDOMTreeAsString

public static java.lang.String getDOMTreeAsString(org.w3c.dom.Node node)

print

public static void print(org.w3c.dom.Node node,
                         java.io.PrintWriter out)
This method can 'print' any DOM subtree. Specifically it is set (by means of 'out') to write the in-memory DOM to the same XML file that was originally read. Action thus saves a new version of the XML doc

Parameters:
node - node usually set to the 'doc' node for complete XML file re-write

sortAttributes

protected static org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Returns a sorted list of attributes.



Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.