public class XmlReadOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
_enforceChildrenXorText
A typical pattern for XML data is that only leaf nodes contain text other than white space.
|
CharSet |
_nameCharSet
This is the set of characters which the parser will accept for tag and attribute names,
provided that they are also valid name characters or, in the case of the first character
in a name, valid first name characters.
|
boolean |
_orderedRetrieval
Specifying this amounts to the using classes promising to retrieve from nodes child nodes
and text in order.
|
CharSet |
_valueCharSet
This is the set of characters which the parser will accept for attribute values and
for text in text nodes.
|
static XmlReadOptions |
ALLOW_SUBNODES_AND_TEXT |
static XmlReadOptions |
ANY_ORDER_RETRIEVAL |
static XmlReadOptions |
DEFAULT |
static CharSet |
MOST_LENIENT_CHAR_SET
Different XML standards allow different character sets.
|
Constructor and Description |
---|
XmlReadOptions(boolean enforceChildrenXorText,
boolean orderedRetrieval,
CharSet charSet)
Constructor.
|
XmlReadOptions(boolean enforceChildrenXorText,
boolean orderedRetrieval,
CharSet nameCharSet,
CharSet valueCharSet)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
XmlReadOptions |
diffCharSet(CharSet charSet) |
XmlReadOptions |
diffNameCharSet(CharSet nameCharSet) |
XmlReadOptions |
diffValueCharSet(CharSet valueCharSet) |
java.lang.String |
toString() |
public final boolean _enforceChildrenXorText
public final boolean _orderedRetrieval
With this option the using classes should avoid certain operations, such as retrieving child nodes by index.
This facilitates garbage collection which means that we don't have to have all XML in memory at the same time.
public final CharSet _nameCharSet
To put this another way, when reading a tag or attribute name, any characters encountered must match this set as well as the XML rules for names. But apart from the zero character, there is no harm to specify characters which are not valid name chars. That way, users are spared the inconvenience of having to specify the name char rules.
public final CharSet _valueCharSet
public static final CharSet MOST_LENIENT_CHAR_SET
public static final XmlReadOptions DEFAULT
public static final XmlReadOptions ANY_ORDER_RETRIEVAL
public static final XmlReadOptions ALLOW_SUBNODES_AND_TEXT
public XmlReadOptions(boolean enforceChildrenXorText, boolean orderedRetrieval, CharSet charSet)
enforceChildrenOrText
- @see _enforceChildrenOrTextorderedRetrieval
- @see _orderedRetrievalcharSet
- @see _nameCharSet and @see _valueCharSet . This set must not
allow the character with integer value zero.public XmlReadOptions(boolean enforceChildrenXorText, boolean orderedRetrieval, CharSet nameCharSet, CharSet valueCharSet)
enforceChildrenOrText
- @see _enforceChildrenOrTextorderedRetrieval
- @see _orderedRetrievalnameCharSet
- @see _nameCharSet This set must not allow the character
with integer value zero. Apart from that, it makes no
difference if illegal name characters are specified.valueCharSet
- @see _valueCharSet This set must not allow the character
with integer value zero.public java.lang.String toString()
toString
in class java.lang.Object
public XmlReadOptions diffNameCharSet(CharSet nameCharSet)
public XmlReadOptions diffValueCharSet(CharSet valueCharSet)
public XmlReadOptions diffCharSet(CharSet charSet)