Lines Matching refs:reader
20 reader = input.newTextReader("test1") variable
21 ret = reader.Read()
25 if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
26 reader.NodeType() != 1 or reader.HasAttributes() != 0:
29 ret = reader.Read()
33 if reader.Name() != "b" or reader.IsEmptyElement() != 1 or \
34 reader.NodeType() != 1 or reader.HasAttributes() != 1:
37 ret = reader.Read()
41 if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
42 reader.NodeType() != 1 or reader.HasAttributes() != 0:
45 ret = reader.Read()
49 if reader.Name() != "#text" or reader.IsEmptyElement() != 0 or \
50 reader.NodeType() != 3 or reader.HasAttributes() != 0 or \
51 reader.Value() != "content of c":
54 ret = reader.Read()
58 if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
59 reader.NodeType() != 15 or reader.HasAttributes() != 0:
62 ret = reader.Read()
66 if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
67 reader.NodeType() != 15 or reader.HasAttributes() != 0:
70 ret = reader.Read()
80 reader = input.newTextReader("test2") variable
82 ret = reader.Read()
86 if reader.GetAttributeNo(0) != "urn:datatypes" or \
87 reader.GetAttributeNo(1) != "int" or \
88 reader.GetAttributeNs("type", "urn:datatypes") != "int" or \
89 reader.GetAttribute("dt:type") != "int":
102 reader = input.newTextReader("test3") variable
104 ret = reader.Read()
106 if reader.Name() == "ref":
107 if reader.LookupNamespace("a") != "urn:456":
111 ret = reader.Read()
121 reader = input.newTextReader("test4") variable
122 ret = reader.Read()
129 if reader.MoveToAttributeNo(0) != 1:
132 if reader.Value() != "urn:1":
135 if reader.Name() != "xmlns":
138 if reader.MoveToAttributeNo(1) != 1:
141 if reader.Value() != "urn:2":
144 if reader.Name() != "xmlns:a":
147 if reader.MoveToAttributeNo(2) != 1:
150 if reader.Value() != "b":
153 if reader.Name() != "b":
156 if reader.MoveToAttributeNo(3) != 1:
159 if reader.Value() != "a:b":
162 if reader.Name() != "a:b":
168 if reader.MoveToAttribute("xmlns") != 1:
171 if reader.Value() != "urn:1":
174 if reader.MoveToAttribute("xmlns:a") != 1:
177 if reader.Value() != "urn:2":
180 if reader.MoveToAttribute("b") != 1:
183 if reader.Value() != "b":
186 if reader.MoveToAttribute("a:b") != 1:
189 if reader.Value() != "a:b":
192 if reader.MoveToAttributeNs("b", "urn:2") != 1:
195 if reader.Value() != "a:b":
201 if reader.MoveToElement() != 1:
204 if reader.MoveToFirstAttribute() != 1:
207 if reader.Value() != "urn:1":
210 if reader.Name() != "xmlns":
213 if reader.MoveToNextAttribute() != 1:
216 if reader.Value() != "urn:2":
219 if reader.Name() != "xmlns:a":
222 if reader.MoveToNextAttribute() != 1:
225 if reader.Value() != "b":
228 if reader.Name() != "b":
231 if reader.MoveToNextAttribute() != 1:
234 if reader.Value() != "a:b":
237 if reader.Name() != "a:b":
240 if reader.MoveToNextAttribute() != 0:
250 reader = input.newTextReader("test6") variable
251 ret = reader.Read()
255 ret = reader.MoveToFirstAttribute()
259 if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
260 reader.LocalName() != "xmlns" or reader.Name() != "xmlns" or \
261 reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
267 reader = input.newTextReader("test7") variable
268 ret = reader.Read()
272 ret = reader.MoveToFirstAttribute()
276 if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
277 reader.LocalName() != "prefix" or reader.Name() != "xmlns:prefix" or \
278 reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
287 reader = input.newTextReader("test8") variable
288 ret = reader.Read()
292 if reader.Name() != "a" or reader.IsEmptyElement() != 1:
295 ret = reader.Read()
306 reader = input.newTextReader("tst")
308 while reader.Read():
309 res=res + "%s (%s) [%s] %d %d\n" % (reader.NodeType(),reader.Name(),
310 reader.Value(), reader.IsEmptyElement(),
311 reader.Depth())
312 if reader.NodeType() == 1: # Element
313 while reader.MoveToNextAttribute():
314 res = res + "-- %s (%s) [%s] %d %d\n" % (reader.NodeType(),
315 reader.Name(),reader.Value(),
316 reader.IsEmptyElement(), reader.Depth())
438 del reader