org.deegree.framework.xml
Class DOMPrinter
java.lang.Object
  
org.deegree.framework.xml.DOMPrinter
public class DOMPrinter
- extends Object
 
DOMPrinter contains various methods to print DOM-XML-elements to a String,PrintWriter or Standard out.
- Version:
 
  - $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Thu, 18 Jun 2009) $
 
- Author:
 
  - Andreas Poth, last edited by: $Author: mschneider $
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
DOMPrinter
public DOMPrinter()
printNode
public static void printNode(PrintWriter out,
                             Node node)
- Parameters:
 out - node - 
 
printNode
public static void printNode(Node node,
                             String indent)
- Parameters:
 node - indent - 
 
nodeToString
public static String nodeToString(Node node,
                                  String encoding)
- Parameters:
 node - encoding - 
- Returns:
 - the String representation of the given node.
 
 
validateCDATA
public static StringBuffer validateCDATA(String cdata)
- Checks if a given CDATA-value has to be escaped if it is used as a text value in an XML element. If the submitted
 string contains a character that have to be escaped or if the string is made of more than 1500 characters it is
 encapsulated into a CDATA-section. Returns a version that is safe to be used.
 
 The method is just proofed for the UTF-8 character encoding.
- Parameters:
 cdata - value to be used
- Returns:
 - the very same value (but escaped if necessary)
 - To do:
 
  - refactoring required
 
 
 
                an open source project founded by lat/lon, Bonn, Germany.
                    For more information visit: http://www.deegree.org