public abstract class XmlUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
renderJaxb(JAXBContext jaxbContext,
Object object,
Boolean prettyPrint)
Creates a String representation of a JAXB object.
|
static String |
rootElementName(String s)
Returns local name of the root element of the XML document represented
by the given string, or
null , when the given string does
not contain valid XML. |
static byte[] |
serialize(Node inputNode)
Simple method to serialize a DOM-bound XML object to a byte array (string)
|
static Source |
source(String s)
Creates an XML Source from the given XML String.
|
public static Source source(String s)
s
- XML String.public static String rootElementName(String s)
null
, when the given string does
not contain valid XML.s
- XML string.null
when it could not be determined.public static String renderJaxb(JAXBContext jaxbContext, Object object, Boolean prettyPrint)
jaxbContext
- JAXB context corresponding to the object's typeobject
- The JAXB object to be processedprettyPrint
- Whether the XML shall nbe pretty printed or notCopyright © 2018 Open eHealth Foundation. All rights reserved.