org.ow2.easywsdl.tooling.java2wsdl.util
Class XMLSorter

java.lang.Object
  extended by org.ow2.easywsdl.tooling.java2wsdl.util.XMLSorter

public class XMLSorter
extends java.lang.Object


Constructor Summary
XMLSorter()
           
 
Method Summary
static java.lang.String getEncoding(org.w3c.dom.Document xmlDocument)
          Return the encoding of the document.
static java.lang.String sort(org.w3c.dom.Document xmlDocument)
          parse the xml Document and return it with its nodes sorted Use the encoding defined at the parsing or in the document (utf8 is used if no encoding is defined)
static java.lang.String sort(org.w3c.dom.Document xmlDocument, java.lang.String encoding)
          parse the xml String and return it with nodes in the order following the ws i recommendations (types at the beginning)
static void sort(org.w3c.dom.Node node, java.io.OutputStream out, java.lang.String encoding)
          Sort the node into the output stream.
static org.w3c.dom.Document sortNodes(org.w3c.dom.Document xml)
          parse the xml Document and return it with its nodes sorted Use the encoding defined at the parsing or in the document (utf8 is used if no encoding is defined)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSorter

public XMLSorter()
Method Detail

sort

public static java.lang.String sort(org.w3c.dom.Document xmlDocument,
                                    java.lang.String encoding)
parse the xml String and return it with nodes in the order following the ws i recommendations (types at the beginning)

Parameters:
xmlDocument - the xml document to sort. Must be non null
encoding - the encoding to use

sort

public static java.lang.String sort(org.w3c.dom.Document xmlDocument)
parse the xml Document and return it with its nodes sorted Use the encoding defined at the parsing or in the document (utf8 is used if no encoding is defined)

Parameters:
xmlDocument - the xml document to pretty print. Must be non null

sortNodes

public static org.w3c.dom.Document sortNodes(org.w3c.dom.Document xml)
parse the xml Document and return it with its nodes sorted Use the encoding defined at the parsing or in the document (utf8 is used if no encoding is defined)

Parameters:
xmlDocument - the xml document to pretty print. Must be non null

sort

public static void sort(org.w3c.dom.Node node,
                        java.io.OutputStream out,
                        java.lang.String encoding)
                 throws java.lang.Exception
Sort the node into the output stream.

Parameters:
node -
out -
Throws:
java.lang.Exception

getEncoding

public static java.lang.String getEncoding(org.w3c.dom.Document xmlDocument)
Return the encoding of the document.

Parameters:
xmlDocument -
Returns:
InputEncoding or the XmlEncoding of the document, UTF-8 if not found


Copyright © 2008-2010 Petals Link (previously EBM WebSourcing). All Rights Reserved.