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
ConstructorsConstructorDescriptionXml2Json(XmlAligner aligner, boolean skipArrayElementContainers, boolean skipRootElement) -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String qName) booleanvoidsetWriteAttributes(boolean writeAttributes) voidstartElement(String uri, String localName, String qName, Attributes atts) toString()static JsonDocumentContainerMethods 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, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
SAXExceptionIOException
-
toMessage
- Throws:
IOException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classXMLFilterImpl- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classXMLFilterImpl- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classXMLFilterImpl- Throws:
SAXException
-
toString
-
getDocumentContainer
-
isWriteAttributes
public boolean isWriteAttributes() -
setWriteAttributes
public void setWriteAttributes(boolean writeAttributes)
-