summaryrefslogtreecommitdiff
path: root/ext/xmlreader/examples/xmlreader_string.php
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2006-10-15 21:09:28 +0000
committerSVN Migration <svn@php.net>2006-10-15 21:09:28 +0000
commit88ec761548b66f58acc1a86cdd0fc164ca925476 (patch)
treed0af978fa00d83bb1d82c613f66477fbd6bb18aa /ext/xmlreader/examples/xmlreader_string.php
parent268984b4787e797db6054313fc9ba3b9e845306e (diff)
downloadphp-git-PECL_OPENSSL.tar.gz
This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'.PECL_OPENSSL
Diffstat (limited to 'ext/xmlreader/examples/xmlreader_string.php')
-rw-r--r--ext/xmlreader/examples/xmlreader_string.php31
1 files changed, 0 insertions, 31 deletions
diff --git a/ext/xmlreader/examples/xmlreader_string.php b/ext/xmlreader/examples/xmlreader_string.php
deleted file mode 100644
index f267245fd9..0000000000
--- a/ext/xmlreader/examples/xmlreader_string.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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";
- }
-}
-?>