Uses of Class
com.x2j.converter.excp.X2JException
Packages that use X2JException
Package
Description
-
Uses of X2JException in com.x2j.converter
Methods in com.x2j.converter that throw X2JExceptionModifier and TypeMethodDescriptionorg.json.JSONObjectXMLToJSONConverter.convertToJson(File inputXmlFile) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(File inputXmlFile, File jsonSchemaFile) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(File inputXmlFile, String jsonSchema) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(File inputXmlFile, org.json.JSONObject jsonSchemaObj) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(String inputXml) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(String inputXml, String jsonSchema) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(String inputXml, org.json.JSONObject jsonSchemaObj) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(Document inDoc) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(Document inDoc, String jsonSchema) Convert XML to JSON.org.json.JSONObjectXMLToJSONConverter.convertToJson(Document inDoc, org.json.JSONObject jsonSchemaObj) Convert XML to JSON. -
Uses of X2JException in com.x2j.converter.main
Methods in com.x2j.converter.main that throw X2JException -
Uses of X2JException in com.x2j.converter.mgr
Methods in com.x2j.converter.mgr that throw X2JExceptionModifier and TypeMethodDescriptionorg.json.JSONObjectX2JConversionManager.processJSONObject(org.json.JSONObject jsonObj, Element root) This method parses the JSON schema, determines that value/object that needs to be set to a particular key in the final JSON and generates the final JSON as the schema.
It makes multiple other internal method calls to handle: JSON Object (recursive call to itself) JSON Array Stringsorg.json.JSONObjectX2JConversionManager.processJSONObject(Element root) This method generates the output JSON based on the default conversion logic. -
Uses of X2JException in com.x2j.converter.mgr.handlers
Methods in com.x2j.converter.mgr.handlers that throw X2JExceptionModifier and TypeMethodDescriptionX2JStringHandler.handleString(String rawValueString, Element rootElement) Every String handler will have to implement this method for processing the JSON value as per the definition given in the schema. -
Uses of X2JException in com.x2j.converter.mgr.handlers.impl
Methods in com.x2j.converter.mgr.handlers.impl that throw X2JExceptionModifier and TypeMethodDescriptionConcatHandler.handleString(String rawValueString, Element rootElement) Returns the concatenated string of values (resolved values/JSON values).DefaultHandler.handleString(String rawValueString, Element rootElement) Returns the same JSON value string as is.LengthHandler.handleString(String rawValueString, Element rootElement) Returns the length of resolved XPATH value string.LowerCaseHandler.handleString(String rawValueString, Element rootElement) Returns the resolved XPATH value string in lower case.SubStringHandler.handleString(String rawValueString, Element rootElement) Returns the sub-string as per the given input.UpperCaseHandler.handleString(String rawValueString, Element rootElement) Returns the resolved XPATH value string in upper case.ValueHandler.handleString(String rawValueString, Element rootElement) Returns the value of the XPath which can be either the text component or child element(s) in String form.XPathHandler.handleString(String rawValueString, Element rootElement) Returns the resolved XPATH value string. -
Uses of X2JException in com.x2j.converter.utils
Methods in com.x2j.converter.utils that throw X2JExceptionModifier and TypeMethodDescriptionstatic org.json.JSONObjectX2JUtils.getJsonFromFile(File file) Reads and parses the file and returns the JSON object.static org.json.JSONObjectX2JUtils.getJsonFromString(String jsonString) Reads and parses the string and returns the JSON object.static NodeListX2JUtils.getNodesFromXPath(Element element, String xpath) Returns the list of nodes in the XML element as per the path specified in the XPath.static StringParses the XML document and returns the same as a String object.static StringParses the XML element and returns the same as a String object.static StringX2JUtils.getStringValueForHandlers(String value, Element rootElement) Returns the string value as per specified schema for the String handlers.static DocumentX2JUtils.getXmlFromFile(File file) Reads and parses the file and returns the XML document.static DocumentX2JUtils.getXmlFromString(String inputXml) Reads and parses the string and returns the XML document.static StringX2JUtils.getXpathAttribute(Element element, String xpath) Returns the value of an attribute in the XML element as per the path specified in the XPath.static ElementX2JUtils.getXpathElement(Element element, String xpath) Returns the element in the XML element as per the path specified in the XPath.voidX2JMsgUtils.reset()Reloads the messages object from the properties file.static voidX2JUtils.writeJsonToFile(org.json.JSONObject json, File file) Writes the JSON object to a file.