fr.opensagres.xdocreport.core.utils
Class XMLUtils

java.lang.Object
  extended by fr.opensagres.xdocreport.core.utils.XMLUtils

public class XMLUtils
extends Object

XML Utilities to indent XML.


Field Summary
static Integer INDENT_NUMBER
           
static List<IXMLPrettyPrinter> PRINTERS
           
 
Constructor Summary
XMLUtils()
           
 
Method Summary
static String prettyPrint(String xml)
          Indent the given xml with the 4 indentation.
static String prettyPrint(String xml, int indent)
          Indent the given xml with the given indent number.
static org.xml.sax.helpers.AttributesImpl toAttributesImpl(Attributes attributes)
          Get the SAX AttributesImpl of teh given attributes to modify attribute values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDENT_NUMBER

public static final Integer INDENT_NUMBER

PRINTERS

public static final List<IXMLPrettyPrinter> PRINTERS
Constructor Detail

XMLUtils

public XMLUtils()
Method Detail

prettyPrint

public static String prettyPrint(String xml)
Indent the given xml with the 4 indentation.

Parameters:
xml - XML to indent
Returns:
Throws:
Exception

prettyPrint

public static String prettyPrint(String xml,
                                 int indent)
Indent the given xml with the given indent number.

Parameters:
xml - XML to indent
indent - the indent number.
Returns:
Throws:
Exception

toAttributesImpl

public static org.xml.sax.helpers.AttributesImpl toAttributesImpl(Attributes attributes)
Get the SAX AttributesImpl of teh given attributes to modify attribute values.

Parameters:
attributes -
Returns:


Copyright © 2013. All rights reserved.