| java.lang.Object com.nabhinc.util.DOM2Writer
DOM2Writer | public class DOM2Writer (Code) | | This class is a utility to serialize a DOM node as XML. This class
uses the DOM Level 2 APIs.
The main difference between this class and DOMWriter is that this class
generates and prints out namespace declarations.
author: Matthew J. Duftler (duftler@us.ibm.com) author: Joseph Kesselman |
Method Summary | |
public static String | getNamespace(String prefix, Node e, Node stopNode) Searches for the namespace URI of the given prefix in the given DOM range.
The namespace is not searched in parent of the "stopNode". | public static String | getNamespace(String prefix, Node e) | public static String | nodeToString(Node node, boolean omitXMLDecl, String encoding) Return a string containing this node serialized as XML. | public static String | normalize(String s) | public static void | serializeAsXML(Node node, Writer writer, boolean omitXMLDecl, String encoding, int indent, int delta) Serialize this node into the writer as XML. | public static void | serializeAsXML(Node node, Writer writer, boolean omitXMLDecl, boolean pretty, String encoding, int indent, int delta) Serialize this node into the writer as XML. |
CR | final public static char CR(Code) | | |
NL | final public static char NL(Code) | | |
getNamespace | public static String getNamespace(String prefix, Node e, Node stopNode)(Code) | | Searches for the namespace URI of the given prefix in the given DOM range.
The namespace is not searched in parent of the "stopNode". This is
usefull to get all the needed namespaces when you need to ouput only a
subtree of a DOM document.
Parameters: prefix - the prefix to find Parameters: e - the starting node Parameters: stopNode - null to search in all the document or a parent node where the search must stop. null if no namespace is found, or the namespace URI. |
nodeToString | public static String nodeToString(Node node, boolean omitXMLDecl, String encoding)(Code) | | Return a string containing this node serialized as XML.
|
serializeAsXML | public static void serializeAsXML(Node node, Writer writer, boolean omitXMLDecl, String encoding, int indent, int delta)(Code) | | Serialize this node into the writer as XML.
|
serializeAsXML | public static void serializeAsXML(Node node, Writer writer, boolean omitXMLDecl, boolean pretty, String encoding, int indent, int delta)(Code) | | Serialize this node into the writer as XML.
|
|
|