public class XMLUtils extends XMLUtils
Modifier and Type | Field and Description |
---|---|
static String |
APACHE_XML_FEATURES_VALIDATION_SCHEMA |
static String |
APACHE_XML_FEATURES_VALIDATION_SCHEMA_FULL_CHECKING |
static String |
JAXP_PROPERTIES_SCHEMA_LANGUAGE |
static String |
JAXP_PROPERTIES_SCHEMA_LANGUAGE_VALUE |
static String |
JAXP_PROPERTIES_SCHEMA_SOURCE |
static String |
TRANSFORMER_FACTORY_JDK5 |
Constructor and Description |
---|
XMLUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(javax.xml.stream.XMLStreamReader reader,
javax.xml.stream.XMLStreamWriter writer)
Copies the reader to the writer.
|
static void |
copy(javax.xml.stream.XMLStreamReader reader,
javax.xml.stream.XMLStreamWriter writer,
boolean fragment) |
static Transformer |
getTransformer() |
static org.dom4j.Document |
toDocument(Object obj) |
static org.dom4j.Document |
toDocument(Object obj,
String externalSchemaLocation)
Converts an object of unknown type to an org.dom4j.Document if possible.
|
static Source |
toStreamSource(javax.xml.stream.XMLInputFactory xmlInputFactory,
boolean useStaxSource,
InputStream stream) |
static String |
toXml(Document dom)
Converts a DOM to an XML string.
|
static Source |
toXmlSource(javax.xml.stream.XMLInputFactory xmlInputFactory,
boolean useStaxSource,
Object src)
Convert our object to a Source type efficiently.
|
static javax.xml.stream.XMLStreamReader |
toXMLStreamReader(javax.xml.stream.XMLInputFactory factory,
Object obj)
Returns an XMLStreamReader for an object of unknown type if possible.
|
attributeName, elementToString, getTextChild, isLocalName
public static final String TRANSFORMER_FACTORY_JDK5
public static final String APACHE_XML_FEATURES_VALIDATION_SCHEMA
public static final String APACHE_XML_FEATURES_VALIDATION_SCHEMA_FULL_CHECKING
public static final String JAXP_PROPERTIES_SCHEMA_SOURCE
public static final String JAXP_PROPERTIES_SCHEMA_LANGUAGE
public static final String JAXP_PROPERTIES_SCHEMA_LANGUAGE_VALUE
public static Transformer getTransformer() throws TransformerConfigurationException
TransformerConfigurationException
- if no TransformerFactory can be located in the
runtime environment.public static org.dom4j.Document toDocument(Object obj) throws Exception
Exception
public static org.dom4j.Document toDocument(Object obj, String externalSchemaLocation) throws Exception
org.dom4j.DocumentException
- if an error occurs while parsingException
public static javax.xml.stream.XMLStreamReader toXMLStreamReader(javax.xml.stream.XMLInputFactory factory, Object obj) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static Source toXmlSource(javax.xml.stream.XMLInputFactory xmlInputFactory, boolean useStaxSource, Object src) throws Exception
Exception
public static Source toStreamSource(javax.xml.stream.XMLInputFactory xmlInputFactory, boolean useStaxSource, InputStream stream) throws javax.xml.stream.XMLStreamException
public static void copy(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
reader
- writer
- javax.xml.stream.XMLStreamException
public static void copy(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.XMLStreamWriter writer, boolean fragment) throws javax.xml.stream.XMLStreamException
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.