public class ConfigurationContentParser extends Object
| Constructor and Description |
|---|
ConfigurationContentParser() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
buildXml(Document document,
ElementContent content)
Create top-level element, then pass off to recursive function.
|
protected static void |
buildXml(Document document,
Element parent,
ElementContent content)
Recursively create DOM from JSON model.
|
static Document |
buildXml(ElementContent content)
Build an XML configuration file from the JSON content.
|
static String |
format(Document xml)
Format XML.
|
static ElementContent |
parse(byte[] config)
Parse a byte[] containing SiteWhere XML configuration for JSON representation.
|
protected static ElementContent |
parse(Element element)
Recursively parse the XML document.
|
public static ElementContent parse(byte[] config) throws com.sitewhere.spi.SiteWhereException
config - com.sitewhere.spi.SiteWhereExceptionprotected static ElementContent parse(Element element) throws com.sitewhere.spi.SiteWhereException
element - com.sitewhere.spi.SiteWhereExceptionpublic static Document buildXml(ElementContent content) throws com.sitewhere.spi.SiteWhereException
content - com.sitewhere.spi.SiteWhereExceptionprotected static void buildXml(Document document, ElementContent content) throws com.sitewhere.spi.SiteWhereException
document - content - com.sitewhere.spi.SiteWhereExceptionprotected static void buildXml(Document document, Element parent, ElementContent content) throws com.sitewhere.spi.SiteWhereException
document - parent - content - com.sitewhere.spi.SiteWhereExceptionpublic static String format(Document xml) throws com.sitewhere.spi.SiteWhereException
xml - Exceptioncom.sitewhere.spi.SiteWhereExceptionCopyright © 2016 SiteWhere, LLC.. All rights reserved.