SMILA (incubation) API documentation

org.eclipse.smila.utils.xml
Class XMLUtilsConfig

java.lang.Object
  extended by org.eclipse.smila.utils.xml.XMLUtilsConfig

public class XMLUtilsConfig
extends java.lang.Object

This class holds data to construct and set the parser in XMLUtils.


Constructor Summary
XMLUtilsConfig()
          Shorthand for XMLUtilsConfig(true, false).
XMLUtilsConfig(boolean validate, boolean includeIgnorableWhitespace)
          Validation by XML Schema is always turned on.
 
Method Summary
 java.util.Iterator 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) .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtilsConfig

public XMLUtilsConfig()
Shorthand for
 XMLUtilsConfig(true, false).
 
This means that validation and stripping of empty text nodes is turned on by default. ************************************************************************


XMLUtilsConfig

public XMLUtilsConfig(boolean validate,
                      boolean includeIgnorableWhitespace)
Validation by XML Schema is always turned on.

Parameters:
validate - -
includeIgnorableWhitespace - -
Method Detail

getFeatures

public java.util.Iterator getFeatures()
Returns all features as String-Objects in this iterator. Used in conjuction with #getFeatureValue() it is possible to retrieve all set features and their values.

Returns:
Iterator

getFeatureValue

public boolean getFeatureValue(java.lang.String feature)
Returns the value of a given feature. Used in conjuction with getFeatures() it is possible to retrieve all set features and their values.

Parameters:
feature - -
Returns:
boolean

getIncludeIgnorabelWhitespace

public java.lang.Boolean getIncludeIgnorabelWhitespace()
Shorthand for
 getFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace")
 
.

Returns:
Boolean

getValidate

public java.lang.Boolean getValidate()
Shorthand for
 getFeature("http://xml.org/sax/features/validation")
 
.

Returns:
Boolean

setFeature

public void setFeature(java.lang.String feature,
                       boolean value)
These are the same features as allowed by the used parser. However, it's not checked here if they are supported or not. ************************************************************************

Parameters:
feature - -
value - -

setIncludeIgnorabelWhitespace

public void setIncludeIgnorabelWhitespace(boolean value)
Shorthand for
 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.

Parameters:
value - -

setValidate

public void setValidate(boolean value)
Shorthand for
 setFeature("http://xml.org/sax/features/validation", value)
 
.

Parameters:
value - -

SMILA (incubation) API documentation