background image

Sample Iterator API Event Mapping

<< Sample Event Mapping | Cursor and Iterator APIs >>
<< Sample Event Mapping | Cursor and Iterator APIs >>
86
S
TREAMING
API
FOR
XML
There are several important things to note in the above example:
· The events are created in the order in which the corresponding XML ele-
ments are encountered in the document, including nesting of elements,
8
qname = ISBN
attributes = null
namespaces = null
StartElement
9
isCData = false
data = "81-40-34319-4\n\t"
IsWhiteSpace = false
Characters
10
qname = ISBN
namespaces = null
EndElement
11
qname = Cost
attributes = {"currency" -> INR}
namespaces = null
StartElement
12
isCData = false
data = "11.50\n\t"
IsWhiteSpace = false
Characters
13
qname = Cost
namespaces = null
EndElement
14
isCData = false
data = "\n"
IsWhiteSpace = true
Characters
15
qname = Book
namespaces = null
EndElement
16
isCData = false
data = "\n"
IsWhiteSpace = true
Characters
17
qname = BookCatalogue:http://www.publishing.org
namespaces = {BookCatalogue" -> http://www.publishing.org"}
EndElement
18
EndDocument
Table 4­3 Sample Iterator API Event Mapping (Continued)
#
Element/Attribute
Event