[
next
] [
prev
] [
prev-tail
] [
tail
] [
up
]
7.5
White Space with SAX
In a DTD-less XML document all the white space is significant
In a XML document with a DTD some of the whitespace is potentially ignorable.
A DTD tells where text is expected (i.e., PCDATA data type). Whitespace is ignorable where text is not expected (e.g.,
<br>
</br>
)
Whitespace not attached to text is ignorable between elements
The
ContentHandler
interface introduces the following method for tracking whitespace.
ignorableWhitespace(char[] ch, int start, int length)
Ignorable whitespace allow formating of XML files to simplify human access
[
next
] [
prev
] [
prev-tail
] [
front
] [
up
]