php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /php-7.1.11/ext/xmlreader/examples/ |
files >> //php-7.1.11/ext/xmlreader/examples/xmlreader_string.php |
<?php $xmlstring = '<books> <book num="1"> <title>The Grapes of Wrath</title> <author>John Steinbeck</author> </book> <book num="2"> <title>The Pearl</title> <author>John Steinbeck</author> </book> </books>'; $reader = new XMLReader(); $reader->XML($xmlstring); while ($reader->read()) { if ($reader->nodeType != XMLREADER::END_ELEMENT) { print "Node Name: ".$reader->name."\n"; print "Node Value: ".$reader->value."\n"; print "Node Depth: ".$reader->depth."\n"; if ($reader->nodeType==XMLREADER::ELEMENT && $reader->hasAttributes) { $attr = $reader->moveToFirstAttribute(); while ($attr) { print " Attribute Name: ".$reader->name."\n"; print " Attribute Value: ".$reader->value."\n"; $attr = $reader->moveToNextAttribute(); } } print "\n"; } } ?>y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`