public class XMLParserConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
String |
cDataTagName
The name of the key in a JSON Object that indicates a CDATA section.
|
boolean |
convertNilAttributeToNull
When parsing the XML into JSON, specifies if values with attribute xsi:nil="true"
should be kept as attribute(false), or they should be converted to null(true)
|
static XMLParserConfiguration |
KEEP_STRINGS
Original configuration of the XML Parser except that values are kept as strings.
|
boolean |
keepStrings
When parsing the XML into JSON, specifies if values should be kept as strings (true), or if
they should try to be guessed into JSON values (numeric, boolean, string)
|
static XMLParserConfiguration |
ORIGINAL
Original Configuration of the XML Parser.
|
Constructor and Description |
---|
XMLParserConfiguration()
Default parser configuration.
|
XMLParserConfiguration(boolean keepStrings)
Configure the parser string processing and use the default CDATA Tag Name as "content".
|
XMLParserConfiguration(boolean keepStrings,
String cDataTagName)
Configure the parser to use custom settings.
|
XMLParserConfiguration(boolean keepStrings,
String cDataTagName,
boolean convertNilAttributeToNull)
Configure the parser to use custom settings.
|
XMLParserConfiguration(String cDataTagName)
Configure the parser string processing to try and convert XML values to JSON values and
use the passed CDATA Tag Name the processing value.
|
public static final XMLParserConfiguration ORIGINAL
public static final XMLParserConfiguration KEEP_STRINGS
public final boolean keepStrings
public final String cDataTagName
null
to indicate no CDATA
processing.public final boolean convertNilAttributeToNull
public XMLParserConfiguration()
public XMLParserConfiguration(boolean keepStrings)
keepStrings
- true
to parse all values as string.
false
to try and convert XML string values into a JSON value.public XMLParserConfiguration(String cDataTagName)
null
to
disable CDATA processingcDataTagNamenull
- to disable CDATA processing. Any other value
to use that value as the JSONObject key name to process as CDATA.public XMLParserConfiguration(boolean keepStrings, String cDataTagName)
keepStrings
- true
to parse all values as string.
false
to try and convert XML string values into a JSON value.cDataTagNamenull
- to disable CDATA processing. Any other value
to use that value as the JSONObject key name to process as CDATA.public XMLParserConfiguration(boolean keepStrings, String cDataTagName, boolean convertNilAttributeToNull)
keepStrings
- true
to parse all values as string.
false
to try and convert XML string values into a JSON value.cDataTagName
- null
to disable CDATA processing. Any other value
to use that value as the JSONObject key name to process as CDATA.convertNilAttributeToNull
- true
to parse values with attribute xsi:nil="true" as null.
false
to parse values with attribute xsi:nil="true" as {"xsi:nil":true}.Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.