to JSONObject
Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and
<[ [ ]]>
Return
A JSONObject containing the structured data from the XML string.
Parameters
The source string.
Throws
Thrown if there is an errors while parsing the string
Convert a well-formed (but not necessarily valid) XML into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and
<[ [ ]]>
Return
A JSONObject containing the structured data from the XML string.
Parameters
The XML source reader.
Throws
Thrown if there is an errors while parsing the string
Convert a well-formed (but not necessarily valid) XML into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and
<[ [ ]]>
Return
A JSONObject containing the structured data from the XML string.
Parameters
The XML source reader.
If true, then values will not be coerced into boolean or numeric values and will instead be left as strings
Throws
Thrown if there is an errors while parsing the string
Convert a well-formed (but not necessarily valid) XML into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and
<[ [ ]]>
Return
A JSONObject containing the structured data from the XML string.
Parameters
The XML source reader.
Configuration options for the parser
Throws
Thrown if there is an errors while parsing the string
Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and
<[ [ ]]>
Return
A JSONObject containing the structured data from the XML string.
Parameters
The source string.
If true, then values will not be coerced into boolean or numeric values and will instead be left as strings
Throws
Thrown if there is an errors while parsing the string
Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in a "content" member. Comments, prologs, DTDs, and
<[ [ ]]>
Return
A JSONObject containing the structured data from the XML string.
Parameters
The source string.
Configuration options for the parser.
Throws
Thrown if there is an errors while parsing the string