public class XMLUtilsConfig
extends java.lang.Object
| Constructor and Description |
|---|
XMLUtilsConfig()
Shorthand for
XMLUtilsConfig(true, false).
|
XMLUtilsConfig(boolean validate,
boolean includeIgnorableWhitespace)
Validation by XML Schema is always turned on.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<java.lang.String> |
getFeatures()
Returns all features as String-Objects in this iterator.
|
boolean |
getFeatureValue(java.lang.String feature)
Returns the value of a given feature.
|
java.lang.Boolean |
getIncludeIgnorabelWhitespace()
Shorthand for
getFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace")
.
|
java.lang.Boolean |
getValidate()
Shorthand for
getFeature("http://xml.org/sax/features/validation")
.
|
void |
setFeature(java.lang.String feature,
boolean value)
These are the same features as allowed by the used parser.
|
void |
setIncludeIgnorabelWhitespace(boolean value)
Shorthand for
setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", value)
.
|
void |
setValidate(boolean value)
Shorthand for
setFeature("http://xml.org/sax/features/validation", value)
.
|
public XMLUtilsConfig()
XMLUtilsConfig(true, false).This means that validation and stripping of empty text nodes is turned on by default. ************************************************************************
public XMLUtilsConfig(boolean validate,
boolean includeIgnorableWhitespace)
validate - boolean flag if to validateincludeIgnorableWhitespace - boolean flag if ti include ignorable whitespacespublic java.lang.Boolean getIncludeIgnorabelWhitespace()
getFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace")
.public void setIncludeIgnorabelWhitespace(boolean value)
setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", value)
. If this is turned on then validation must be turned on eventually too other wise an exception will be
thrown when given this as a paramter to a parse()-method in XMLUtils.value - boolean flagpublic java.lang.Boolean getValidate()
getFeature("http://xml.org/sax/features/validation")
.public void setValidate(boolean value)
setFeature("http://xml.org/sax/features/validation", value)
.value - boolean flagpublic void setFeature(java.lang.String feature,
boolean value)
feature - the featurevalue - the boolean valuepublic java.util.Iterator<java.lang.String> getFeatures()
#getFeatureValue() it is
possible to retrieve all set features and their values.public boolean getFeatureValue(java.lang.String feature)
getFeatures() it is possible to retrieve all
set features and their values.feature - the feature