diff options
author | Jiri Vanek <[email protected]> | 2013-06-21 12:15:03 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-06-21 12:15:03 +0200 |
commit | da8ec0b9cba22448fbb5b599bff3e1f5fb8c0bf7 (patch) | |
tree | e3cd2c82fd0eff3b9d9c95b4f67fac27d7d519bc /netx/net/sourceforge/jnlp/ParserSettings.java | |
parent | 70371886c351800a6fad9bad17777179af2d8584 (diff) |
Added tagsup (optional dependence) as sanitizer for (possibly) invalid xml files
Diffstat (limited to 'netx/net/sourceforge/jnlp/ParserSettings.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/ParserSettings.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/netx/net/sourceforge/jnlp/ParserSettings.java b/netx/net/sourceforge/jnlp/ParserSettings.java index b0a69e3..de781d9 100644 --- a/netx/net/sourceforge/jnlp/ParserSettings.java +++ b/netx/net/sourceforge/jnlp/ParserSettings.java @@ -35,7 +35,6 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package net.sourceforge.jnlp; /** @@ -46,16 +45,34 @@ package net.sourceforge.jnlp; public class ParserSettings { private final boolean isStrict; + private final boolean extensionAllowed; + private final boolean malformedXmlAllowed; + /** Create a new ParserSettings with the defautl parser settings */ public ParserSettings() { - isStrict = false; + this(false, true, true); + } + + /** Create a new ParserSettings object */ + public ParserSettings(boolean strict, boolean extensionAllowed, boolean malformedXmlAllowed) { + this.isStrict = strict; + this.extensionAllowed = extensionAllowed; + this.malformedXmlAllowed = malformedXmlAllowed; } - public ParserSettings(boolean strict) { - isStrict = strict; + /** @return true if extensions to the spec are allowed */ + public boolean isExtensionAllowed() { + return extensionAllowed; } + /** @return true if parsing malformed xml is allowed */ + public boolean isMalformedXmlAllowed() { + return malformedXmlAllowed; + } + + /** @return true if strict parsing mode is to be used */ public boolean isStrict() { return isStrict; } -} + +}
\ No newline at end of file |