public final class DOM2Writer extends Object
DOM Level 2
APIs.
The main difference between this class and DOMWriter is that this class
generates and prints out namespace declarations.Modifier and Type | Method and Description |
---|---|
static String |
nodeToString(Node node)
Return a string containing this node serialized as XML.
|
static String |
nodeToString(Node node,
boolean omitXMLDecl)
Return a string containing this node serialized as XML.
|
static void |
normalize(String s,
PrintWriter fOut)
Normalizes and prints the given string.
|
static void |
serializeAsXML(Node node,
Writer writer,
boolean omitXMLDecl)
Serialize this node into the writer as XML.
|
static void |
serializeAsXML(Node node,
Writer writer,
boolean omitXMLDecl,
boolean pretty)
Serialize this node into the writer as XML.
|
public static final char NL
public static final String LS
public static String nodeToString(Node node)
public static String nodeToString(Node node, boolean omitXMLDecl)
public static void serializeAsXML(Node node, Writer writer, boolean omitXMLDecl)
public static void serializeAsXML(Node node, Writer writer, boolean omitXMLDecl, boolean pretty)
public static void normalize(String s, PrintWriter fOut)
Copyright © 2021 JBoss by Red Hat. All rights reserved.