Lines Matching refs:reader
16 $reader = new XMLReader();
17 if (!$reader->open($filename)) {
22 while ($reader->read()) {
23 if ($reader->nodeType != XMLREADER::END_ELEMENT) {
25 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') {
26 $attr = $reader->moveToFirstAttribute();
27 $attr = $reader->moveToAttributeNs('idx', 'http://www.ns1.namespace.org/');
28 echo $reader->name . ": ";
29 echo $reader->value . "\n";
31 $attr = $reader->moveToAttributeNs('idx', 'http://www.ns2.namespace.org/');
32 echo $reader->name . ": ";
33 echo $reader->value . "\n";
35 $attr = $reader->moveToAttributeNs('isbn', 'http://www.ns2.namespace.org/');
36 echo $reader->name . ": ";
37 echo $reader->value . "\n";
40 $attr = $reader->moveToAttributeNs('elephpant', 'http://www.ns2.namespace.org/');
46 echo $reader->name . ": ";
47 echo $reader->value . "\n";
53 $reader->close();