Java Reference
In-Depth Information
characters() [
black-stroked rectangle.
]
startCDATA()
characters() [<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<rect width="300" height="100"
style="fill:rgb(0,0,255);stroke-width:1;
stroke:rgb(0,0,0)"/>
</svg>]
endCDATA()
characters() [
]
endElement() uri=[], localName=[example], qName=[example]
characters() [
]
endElement() uri=[], localName=[svg-examples], qName=[svg-
examples]
endDocument()
The first output line (the
@1f98d58
value will probably be different) proves that
setDocumentLocator()
is called first. It also identifies the
Locator
instance
whose
getColumnNumber()
and
getLineNumber()
methods are called to out-
put the parser location when
startElement()
is called—these methods return
column and line numbers starting at 1.
Perhaps you're curious about the three instances of the following output:
characters() [
]
The instance of this output that follows the
endCDATA()
output is reporting a
carriage return/line feed combination that wasn't included in the preceding
char-
acter()
method call, which was passed the contents of the CDATA section minus
theselineterminatorcharacters.Incontrast,theinstancesofthisoutputthatfollowthe
startElement()
call for
svg-examples
and follow the
endElement()
call
for
example
aresomewhatcurious.There'snocontentbetween
<svg-examples>
and
<example>
, and between
</example>
and
</svg-examples>
, or is there?