dk.brics.xact.operations
Class XMLPrinter

java.lang.Object
  extended by dk.brics.xact.operations.XMLPrinter

public class XMLPrinter
extends Object

Prints XML templates to output streams.


Method Summary
static String getElementStringValue(Element e)
          Returns the string value of an element.
static void print(XML x, OutputStream out, String encoding, boolean gaps, boolean xmldecl)
          Prints the given XML template.
static void print(XML x, OutputStream out, String encoding, boolean gaps, boolean xmldecl, XMLIndentation indentation)
          Prints the given XML template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getElementStringValue

public static String getElementStringValue(Element e)
Returns the string value of an element.


print

public static void print(XML x,
                         OutputStream out,
                         String encoding,
                         boolean gaps,
                         boolean xmldecl)
                  throws UnsupportedEncodingException
Prints the given XML template.

Parameters:
gaps - if set, gaps are printed, otherwise they are skipped
xmldecl - if set, include XML declaration (and DOCTYPE if XHTML)
Throws:
XMLWellformednessException - if XML declaration is enabled and the result is not a wellformed XML document
UnsupportedEncodingException - if the encoding is not supported

print

public static void print(XML x,
                         OutputStream out,
                         String encoding,
                         boolean gaps,
                         boolean xmldecl,
                         XMLIndentation indentation)
                  throws UnsupportedEncodingException
Prints the given XML template.

Parameters:
gaps - if set, gaps are printed, otherwise they are skipped
xmldecl - if set, include XML declaration (and DOCTYPE if XHTML)
indentation - how to insert indentation
Throws:
XMLWellformednessException - if XML declaration is enabled and the result is not a wellformed XML document
UnsupportedEncodingException - if the encoding is not supported


Copyright © 2005-2011 Aarhus University.