|
prettyxml 1.2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.hippogrif.prettyxml.PrettyPrint
Prettyprints XML based on JDOM 1.0 according to a set of properties
specifying format and options.
See dk.hippogrif.prettyxml
.
Field Summary |
Fields inherited from interface dk.hippogrif.prettyxml.PropertyNames |
BASIC_KEYS, ENCODING, EXPAND_EMPTY_ELEMENTS, EXTENDED_KEYS, INDENT, INDENT_ATTRIBUTES, INPUT, LINE_SEPARATOR, LINE_SEPARATORS, OMIT_DECLARATION, OMIT_ENCODING, OUTPUT, SORT_ATTRIBUTES, TEXT_MODE, TEXT_MODES, TRANSFORM, URL |
Constructor Summary | |
PrettyPrint()
|
Method Summary | |
static void |
checkProperties(java.util.Properties prop,
boolean extended)
Checks known properties - present boolean properties are set to either "true" or "false", indent=0 is removed, string properties are trimmed and empty properties removed - however, TEXT_MODE is checked when format is initialized and ENCODING when used. |
static void |
execute(java.util.Properties prop)
Do the prettyprint according to properties. |
static java.lang.String |
execute(java.util.Properties prop,
java.lang.String input)
Do the prettyprint according to properties. |
static java.util.Properties |
getDefaultSetting()
Get default properties setting - the first in configured settings. |
static java.lang.String[] |
getEncodings()
Get wellknown encodings. |
static java.util.Properties |
getSetting(java.lang.String name)
Get wellknown properties setting. |
static java.lang.String[] |
getSettings()
Get names of wellknown properties settings. |
static XSLTransformer |
getTransformation(java.lang.String name)
Get wellknown transformation. |
static java.lang.String[] |
getTransformations()
Get names of wellknown transformations. |
static java.lang.String |
getVersion()
Get prettyxml version. |
static java.util.Properties |
loadProperties(java.io.File file)
Load properties from file. |
static java.util.Properties |
loadProperties(java.lang.String name)
Load properties from file or as resource in classpath if file not found. |
static java.util.Properties |
loadPropertiesResource(java.lang.String name)
Load properties as resource in classpath. |
static XSLTransformer |
mkTransformer(java.lang.String name)
Construct an XSL transformer. |
static void |
storeProperties(java.io.File file,
java.util.Properties prop)
Store properties in file with version in header. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PrettyPrint()
Method Detail |
public static java.lang.String getVersion()
public static java.lang.String[] getEncodings()
public static java.lang.String[] getSettings()
public static java.util.Properties getSetting(java.lang.String name)
public static java.util.Properties getDefaultSetting()
public static java.lang.String[] getTransformations()
public static XSLTransformer getTransformation(java.lang.String name)
public static void checkProperties(java.util.Properties prop, boolean extended) throws java.lang.Exception
prop
- holds the propertiesextended
- to include in/out properties
java.lang.Exception
- if property errorpublic static java.util.Properties loadProperties(java.lang.String name) throws java.lang.Exception
name
- of properties file or resource
java.io.IOException
- if io error on reading file
java.lang.Exception
- if resource not foundpublic static java.util.Properties loadPropertiesResource(java.lang.String name) throws java.lang.Exception
name
- of resource holding properties
java.lang.Exception
- if resource not foundpublic static java.util.Properties loadProperties(java.io.File file) throws java.io.IOException
file
- holding properties
java.io.IOException
- on io errorpublic static void storeProperties(java.io.File file, java.util.Properties prop) throws java.io.IOException
file
- to store the properties inprop
- the properties to store
java.io.IOException
- on io errorpublic static XSLTransformer mkTransformer(java.lang.String name) throws java.lang.Exception
name
- of stylesheet file or resource
java.lang.Exception
- if stylesheet not foundpublic static void execute(java.util.Properties prop) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic static java.lang.String execute(java.util.Properties prop, java.lang.String input) throws java.lang.Exception
input
- holds xml document as text if present
java.lang.Exception
- if something goes wrong
|
prettyxml 1.2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |