forked from lunny/axmlParser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listener.go
99 lines (90 loc) · 2.92 KB
/
listener.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package axmlParser
type Listener interface {
StartDocument()
/**
* Receive notification of the end of a document.
*/
EndDocument()
/**
* Begin the scope of a prefix-URI Namespace mapping.
*
* @param prefix
* the Namespace prefix being declared. An empty string is used
* for the default element namespace, which has no prefix.
* @param uri
* the Namespace URI the prefix is mapped to
*/
StartPrefixMapping(prefix, uri string)
/**
* End the scope of a prefix-URI mapping.
*
* @param prefix
* the prefix that was being mapped. This is the empty string
* when a default mapping scope ends.
* @param uri
* the Namespace URI the prefix is mapped to
*/
EndPrefixMapping(prefix, uri string)
/**
* Receive notification of the beginning of an element.
*
* @param uri
* the Namespace URI, or the empty string if the element has no
* Namespace URI or if Namespace processing is not being
* performed
* @param localName
* the local name (without prefix), or the empty string if
* Namespace processing is not being performed
* @param qName
* the qualified name (with prefix), or the empty string if
* qualified names are not available
* @param atts
* the attributes attached to the element. If there are no
* attributes, it shall be an empty Attributes object. The value
* of this object after startElement returns is undefined
*/
StartElement(uri, localName, qName string,
atts []*Attribute)
/**
* Receive notification of the end of an element.
*
* @param uri
* the Namespace URI, or the empty string if the element has no
* Namespace URI or if Namespace processing is not being
* performed
* @param localName
* the local name (without prefix), or the empty string if
* Namespace processing is not being performed
* @param qName
* the qualified XML name (with prefix), or the empty string if
* qualified names are not available
*/
EndElement(uri, localName, qName string)
/**
* Receive notification of text.
*
* @param data
* the text data
*/
Text(data string)
/**
* Receive notification of character data (in a <![CDATA[ ]]> block).
*
* @param data
* the text data
*/
CharacterData(data string)
/**
* Receive notification of a processing instruction.
*
* @param target
* the processing instruction target
* @param data
* the processing instruction data, or null if none was supplied.
* The data does not include any whitespace separating it from
* the target
* @throws org.xml.sax.SAXException
* any SAX exception, possibly wrapping another exception
*/
ProcessingInstruction(target, data string)
}