mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
Update XMLParserConfiguration to not be static and add a comment about the use of shouldTrimWhiteSpace
This commit is contained in:
parent
9ee10fdfc8
commit
e430db40aa
@ -61,6 +61,13 @@ public class XMLParserConfiguration extends ParserConfiguration {
|
|||||||
*/
|
*/
|
||||||
private Set<String> forceList;
|
private Set<String> forceList;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag to indicate whether white space should be trimmed when parsing XML.
|
||||||
|
* The default behaviour is to trim white space. When this is set to false, inputting XML
|
||||||
|
* with tags that are the same as the value of cDataTagName is unsupported. It is recommended to set cDataTagName
|
||||||
|
* to a distinct value in this case.
|
||||||
|
*/
|
||||||
private boolean shouldTrimWhiteSpace;
|
private boolean shouldTrimWhiteSpace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,7 @@ public class XMLTokener extends JSONTokener {
|
|||||||
*/
|
*/
|
||||||
public static final java.util.HashMap<String, Character> entity;
|
public static final java.util.HashMap<String, Character> entity;
|
||||||
|
|
||||||
private static XMLParserConfiguration configuration = XMLParserConfiguration.ORIGINAL;;
|
private XMLParserConfiguration configuration = XMLParserConfiguration.ORIGINAL;;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
entity = new java.util.HashMap<String, Character>(8);
|
entity = new java.util.HashMap<String, Character>(8);
|
||||||
@ -49,11 +49,11 @@ public class XMLTokener extends JSONTokener {
|
|||||||
|
|
||||||
public XMLTokener(Reader r, XMLParserConfiguration configuration) {
|
public XMLTokener(Reader r, XMLParserConfiguration configuration) {
|
||||||
super(r);
|
super(r);
|
||||||
XMLTokener.configuration = configuration;
|
this.configuration = configuration;
|
||||||
}
|
}
|
||||||
public XMLTokener(String s, XMLParserConfiguration configuration) {
|
public XMLTokener(String s, XMLParserConfiguration configuration) {
|
||||||
super(s);
|
super(s);
|
||||||
XMLTokener.configuration = configuration;
|
this.configuration = configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user