|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.util.XMLUtils
public class XMLUtils
Utilities for XML data manipulation
Constructor Summary | |
---|---|
XMLUtils()
|
Method Summary | |
---|---|
static int |
elementToJSONStream(org.jdom.Element xmlElement,
java.io.OutputStreamWriter writer,
boolean prettyFormat,
boolean rootElement)
Convert an XML structure to a JSON string and send the text to an Output stream |
static java.lang.String |
elementToJSONString(org.jdom.Element xmlElement)
Convert an XML structure to a JSON string, in pretty format |
static java.lang.String |
elementToJSONString(org.jdom.Element xmlElement,
boolean prettyFormat,
boolean rootElement)
Convert an XML structure to a JSON string |
static int |
elementToStream(org.jdom.Element xmlElement,
java.io.OutputStreamWriter writer,
boolean prettyFormat)
Convert an XML structure to a UTF-8 text string (in pretty format) and send the text to an Output stream |
static int |
elementToStream(org.jdom.Element xmlElement,
java.io.OutputStreamWriter writer,
boolean prettyFormat,
java.lang.String encoding)
Convert an XML structure to a text string with the given character encoding and send the text to an Output stream |
static java.lang.String |
elementToString(org.jdom.Element xmlElement)
Convert an XML structure to a UTF-8 text string, in pretty format |
static java.lang.String |
elementToString(org.jdom.Element xmlElement,
boolean prettyFormat,
boolean omitDeclaration,
java.lang.String encoding)
Convert an XML structure to a text string with the given character encoding |
static java.lang.String |
elementToString(org.jdom.Element xmlElement,
boolean prettyFormat,
java.lang.String encoding)
Convert an XML structure to a text string with the given character encoding |
static org.jdom.Element |
parseJSONInputStream(java.io.InputStream inStream)
Parse a JSON input stream |
static org.jdom.Element |
parseXML(java.lang.String xmlText)
Parse an UTF-8 XML text |
static org.jdom.Element |
parseXML(java.lang.String xmlText,
java.lang.String encoding)
Parse an XML text for the given character encoding |
static org.jdom.Element |
parseXMLInputStream(java.io.InputStream inStream)
Parse an XML input stream |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLUtils()
Method Detail |
---|
public static org.jdom.Element parseXML(java.lang.String xmlText) throws java.io.UnsupportedEncodingException, org.jdom.JDOMException, java.io.IOException
java.io.UnsupportedEncodingException
org.jdom.JDOMException
java.io.IOException
public static org.jdom.Element parseXML(java.lang.String xmlText, java.lang.String encoding) throws java.io.UnsupportedEncodingException, org.jdom.JDOMException, java.io.IOException
java.io.UnsupportedEncodingException
org.jdom.JDOMException
java.io.IOException
public static org.jdom.Element parseXMLInputStream(java.io.InputStream inStream) throws org.jdom.JDOMException, java.io.IOException
org.jdom.JDOMException
java.io.IOException
public static java.lang.String elementToString(org.jdom.Element xmlElement) throws OberonException
OberonException
public static java.lang.String elementToString(org.jdom.Element xmlElement, boolean prettyFormat, java.lang.String encoding) throws OberonException
prettyFormat
- if true, generates indented text
OberonException
public static java.lang.String elementToString(org.jdom.Element xmlElement, boolean prettyFormat, boolean omitDeclaration, java.lang.String encoding) throws OberonException
prettyFormat
- if true, generates indented textomitDeclaration
- if true, omit the xml header
OberonException
public static int elementToStream(org.jdom.Element xmlElement, java.io.OutputStreamWriter writer, boolean prettyFormat) throws java.io.IOException, OberonException
java.io.IOException
OberonException
public static int elementToStream(org.jdom.Element xmlElement, java.io.OutputStreamWriter writer, boolean prettyFormat, java.lang.String encoding) throws java.io.IOException, OberonException
prettyFormat
- if true, generates indented text
java.io.IOException
OberonException
public static java.lang.String elementToJSONString(org.jdom.Element xmlElement) throws OberonException
OberonException
public static java.lang.String elementToJSONString(org.jdom.Element xmlElement, boolean prettyFormat, boolean rootElement) throws OberonException
prettyFormat
- if true, generates indented textrootElement
- if true, add the rootElement
OberonException
public static int elementToJSONStream(org.jdom.Element xmlElement, java.io.OutputStreamWriter writer, boolean prettyFormat, boolean rootElement) throws java.io.IOException, OberonException
prettyFormat
- if true, generates indented textrootElement
- if true, add the rootElement
java.io.IOException
OberonException
public static org.jdom.Element parseJSONInputStream(java.io.InputStream inStream) throws java.io.IOException, org.json.simple.parser.ParseException
org.json.simple.parser.ParseException
java.io.IOException
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |