Java Reference
In-Depth Information
Youcansatisfythiscuriositybymodifying svg-examples.xml toincludeanin-
ternalDTD.PlacethefollowingDTD(whichindicatesthatan svg-element contains
oneormore example elements,andthatan example elementcontainsparsedchar-
acter data) between the XML declaration and the <svg-examples> start tag:
<!DOCTYPE svg-examples [
<!ELEMENT svg-examples (example+)>
<!ELEMENT example (#PCDATA)>
]>
Continuing, execute java SAXDemo svg-examples.html . This time, you
should see the following output:
setDocumentLocator()
locator=[com.sun.org.apache.xerces.internal.parsers.
AbstractSAXParser$LocatorProxy@1f98d58]
startDocument()
startDTD()
name=[svg-ex-
amples]publicId=[null]systemId=[null]
endDTD()
startElement()
uri=[],
localName=[svg-examples],
qName=[svg-examples]
Column number=[15]
Line number=[6]
ignorableWhitespace() [
]
startElement()
uri=[],
localName=[example],
qName=[example]
Column number=[13]
Line number=[7]
characters() [
The following Scalable Vector Graphics document de-
scribes a blue-filled and
black-stroked rectangle.]
characters() [
]
startCDATA()
characters() [<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
Search WWH ::




Custom Search