Package org.frankframework.align
Class Xml2Json
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.frankframework.align.Xml2Json
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,XMLFilter
,XMLReader
XML Schema guided XML to JSON converter;
- Author:
- Gerrit van Brakel
-
Constructor Summary
ConstructorDescriptionXml2Json
(XmlAligner aligner, boolean skipArrayElementContainers, boolean skipRootElement) -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String qName) boolean
void
setWriteAttributes
(boolean writeAttributes) void
startElement
(String uri, String localName, String qName, Attributes atts) toString()
toString
(boolean indent) static JsonDocumentContainer
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
Xml2Json
-
-
Method Details
-
translate
public static JsonDocumentContainer translate(String xml, URL schemaURL, boolean compactJsonArrays, boolean skipRootElement) throws SAXException, IOException - Throws:
SAXException
IOException
-
toString
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classXMLFilterImpl
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classXMLFilterImpl
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classXMLFilterImpl
- Throws:
SAXException
-
toString
-
getDocumentContainer
-
isWriteAttributes
public boolean isWriteAttributes() -
setWriteAttributes
public void setWriteAttributes(boolean writeAttributes)
-