com.sapportals.wcm.protocol.webdav

Class DomSerializer

java.lang.Object
  extended by com.sapportals.wcm.protocol.webdav.DomSerializer

public class DomSerializer
extends Object

Utility function for serializing the contents of a Document into a String.

Handles the Xerces-specific quirks in serializing documents with namespaces correctly.

Copyright (c) SAP AG 2001-2004


Constructor Summary
DomSerializer()
           
 
Method Summary
static String toString(Document doc, boolean indent)
          Serialize the document to a string.
static String toString(Document doc, boolean indent, boolean doNsProcessing)
          Serialize the document to a string.
static String toString(Element e, boolean indent)
          Serialize the element (and it's children) to a string.
static void write(Writer writer, Node node, boolean indent)
          Serialize the node (and it's descendants) to a writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomSerializer

public DomSerializer()
Method Detail

write

public static void write(Writer writer,
                         Node node,
                         boolean indent)
                  throws IOException
Serialize the node (and it's descendants) to a writer.

Parameters:
node - start node
indent - whether to produce indented XML or not
Throws:
IOException - on write errors

toString

public static String toString(Element e,
                              boolean indent)
Serialize the element (and it's children) to a string.

Parameters:
e - the Element
indent - whether to produce indented XML or not
Returns:
the XML string or an empty string in case of error

toString

public static String toString(Document doc,
                              boolean indent)
Serialize the document to a string.

Parameters:
doc - the document
indent - whether to produce indented XML or not
Returns:
the XML string or an empty string in case of error

toString

public static String toString(Document doc,
                              boolean indent,
                              boolean doNsProcessing)
Serialize the document to a string.

Parameters:
doc - the document
indent - whether to produce indented XML or not
doNsProcessing - enable/disable special namespace support in the serializer
Returns:
the XML string or an empty string in case of error
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice