Home
last modified time | relevance | path

Searched refs:reader (Results 1 – 25 of 67) sorted by relevance

123

/php-src/ext/xmlreader/tests/
H A D003-mb.phpt13 $reader = new XMLReader();
14 if (!$reader->open($filename)) {
19 while ($reader->read()) {
21 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
23 echo $reader->name . ": ";
26 if ($reader->getAttribute($reader->name) == $reader->value) {
35 if ($reader->getAttribute($reader->name) == $reader->value) {
44 if ($reader->getAttribute('num') == $reader->value) {
52 if ($reader->getAttribute('idx') == $reader->value) {
61 if ($reader->getAttributeNo(0) == $reader->value) {
[all …]
H A D003.phpt13 $reader = new XMLReader();
14 if (!$reader->open($filename)) {
19 while ($reader->read()) {
21 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
23 echo $reader->name . ": ";
26 if ($reader->getAttribute($reader->name) == $reader->value) {
35 if ($reader->getAttribute($reader->name) == $reader->value) {
44 if ($reader->getAttribute('num') == $reader->value) {
52 if ($reader->getAttribute('idx') == $reader->value) {
61 if ($reader->getAttributeNo(0) == $reader->value) {
[all …]
H A D012.phpt13 $reader = new XMLReader();
14 $reader->XML($xmlstring);
15 $reader->read();
18 $reader->close();
33 while($reader->read() && $reader->nodeType != XMLReader::ELEMENT);
36 $reader->close();
45 $reader->open($file);
48 while($reader->read() && $reader->nodeType != XMLReader::ELEMENT);
51 $reader->close();
56 while($reader->read() && $reader->nodeType != XMLReader::ELEMENT);
[all …]
H A Dvirtual_properties2.phpt8 $reader = new XMLReader();
10 var_dump(isset($reader->attributeCount));
11 var_dump(empty($reader->attributeCount));
14 var_dump(isset($reader->baseURI));
15 var_dump(empty($reader->baseURI));
18 var_dump(isset($reader->depth));
19 var_dump(empty($reader->depth));
22 var_dump(isset($reader->hasAttributes));
23 var_dump(empty($reader->hasAttributes));
26 var_dump(isset($reader->hasValue));
[all …]
H A Dnext_basic.phpt11 $reader = new XMLReader();
14 $reader->read();
20 $reader->next();
25 $reader->close();
27 $reader->XML($xml);
28 $reader->read();
29 $reader->read();
30 echo $reader->name . PHP_EOL;
33 var_dump($reader->next());
37 var_dump($reader->next());
[all …]
H A D013.phpt18 $reader = new XMLReader();
19 $reader->XML($xml);
21 while($reader->read()) {
22 if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'item') {
23 $reader->read();
24 var_dump($reader->value);
27 $reader->close();
38 $reader = new XMLReader();
39 $reader->XML($xml);
41 while($reader->read() && $reader->nodeType != XMLReader::ELEMENT);
[all …]
H A D007.phpt13 $reader = new XMLReader();
14 $reader->open($file);
17 while ($reader->read());
19 if ($reader->isValid()) {
24 $reader->close();
28 $reader = new XMLReader();
29 $reader->XML($xmlstring);
34 if ($reader->isValid()) {
40 $reader->close();
43 $reader->XML($xmlstring);
[all …]
H A D011.phpt6 <?php $reader = new XMLReader();
15 $reader = new XMLReader();
16 $reader->XML($xmlstring);
17 $reader->read();
18 echo $reader->readInnerXml();
20 $reader->close();
23 $reader = new XMLReader();
24 $reader->XML($xmlstring);
25 $reader->read();
26 echo $reader->readOuterXml();
[all …]
H A D006.phpt11 $reader = new XMLReader();
13 $reader->XML($xmlstring);
16 $reader->read();
17 $reader->read();
19 if ($reader->nodeType != XMLREADER::END_ELEMENT) {
20 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
21 $attr = $reader->moveToFirstAttribute();
22 if ($reader->moveToElement()) {
23 if ($reader->name == 'book') {
30 $reader->close();
H A D004.phpt13 $reader = new XMLReader();
14 if (!$reader->open($filename)) {
18 while ($reader->read()) {
19 if ($reader->nodeType != XMLREADER::END_ELEMENT) {
20 echo $reader->name."\n";
21 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
22 $attr = $reader->moveToFirstAttribute();
24 echo " Attribute Name: ".$reader->name."\n";
25 echo " Attribute Value: ".$reader->value."\n";
26 $attr = $reader->moveToNextAttribute();
[all …]
H A DsetSchema_error.phpt8 $reader = new XMLReader();
10 $reader->setSchema('');
14 $reader->close();
16 $reader = new XMLReader();
18 $reader->setSchema('schema-missing-file.xsd');
22 $reader->close();
24 $reader = new XMLReader();
26 $reader->setSchema('schema-empty.xsd');
31 $reader = new XMLReader();
32 $reader->XML(<<<EOF
[all …]
H A D002.phpt12 $reader = new XMLReader();
14 $reader->open('');
19 $reader = new XMLReader();
20 if (!$reader->open($filename)) {
21 $reader->close();
26 while ($reader->read()) {
27 echo $reader->name."\n";
29 $reader->close();
32 $reader = new XMLReader();
33 $reader->open($filename);
[all …]
H A D015.phpt16 $reader = new XMLReader();
17 if (!$reader->open($filename)) {
22 while ($reader->read()) {
25 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') {
28 echo $reader->name . ": ";
29 echo $reader->value . "\n";
32 echo $reader->name . ": ";
33 echo $reader->value . "\n";
36 echo $reader->name . ": ";
46 echo $reader->name . ": ";
[all …]
H A D003-get-errors.phpt16 $reader = new XMLReader();
17 if (!$reader->open($filename)) {
22 while ($reader->read()) {
25 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') {
26 echo $reader->name . "\n";
30 echo $reader->name . ": ";
31 echo $reader->value . "\n";
41 echo $reader->name . ": ";
48 echo $reader->name . ": ";
55 echo $reader->name . ": ";
[all …]
H A D003-move-errors.phpt16 $reader = new XMLReader();
17 if (!$reader->open($filename)) {
22 while ($reader->read()) {
25 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name == 'book') {
26 echo $reader->name . "\n";
30 echo $reader->name . ": ";
31 echo $reader->value . "\n";
41 echo $reader->name . ": ";
48 echo $reader->name . ": ";
55 echo $reader->name . "\n";
[all …]
H A Dexpand_error.phpt7 <?php $reader = new XMLReader();
8 if (!method_exists($reader, 'expand')) print "skip";
16 $reader = new XMLReader();
19 $reader->expand();
24 $reader->close();
26 $reader = new XMLReader();
27 $reader->XML($xmlstring);
28 var_dump($reader->expand());
29 $reader->close();
H A D008.phpt29 $reader = new XMLReader();
30 $reader->open($file);
31 $reader->setParserProperty(XMLREADER::LOADDTD, TRUE);
32 $reader->setParserProperty(XMLREADER::VALIDATE, TRUE);
33 while($reader->read());
34 if ($reader->isValid()) {
37 $reader->close();
56 $reader = new XMLReader();
57 $reader->XML($xmlstring);
61 while($reader->read());
[all …]
H A D005.phpt11 $reader = new XMLReader();
13 $reader->XML($xmlstring);
16 $a = $reader->setParserProperty(XMLReader::LOADDTD, false);
17 $b = $reader->getParserProperty(XMLReader::LOADDTD);
23 $a = $reader->setParserProperty(XMLReader::SUBST_ENTITIES, true);
24 $b = $reader->getParserProperty(XMLReader::SUBST_ENTITIES);
30 while ($reader->read());
31 $reader->close();
H A D009.phpt11 $reader = new XMLReader();
12 $reader->XML($xmlstring);
15 $reader->read();
16 $reader->read();
18 $reader->next();
19 echo $reader->name;
21 echo $reader->getAttribute('num');
H A D010.phpt10 $reader = new XMLReader();
11 $reader->XML($xmlstring);
14 $reader->read();
15 $reader->read();
17 $reader->next();
18 echo $reader->name;
20 echo $reader->getAttributeNs('isbn', 'uri');
H A Dbug42139.phpt17 $reader = new XMLReader;
18 $reader->XML( $xml, NULL, LIBXML_NOENT);
19 while ( $reader->read() ) {
20 echo "{$reader->nodeType}, {$reader->name}, {$reader->value}\n";
22 $reader->close();
H A Dexpand.phpt7 <?php $reader = new XMLReader();
8 if (!method_exists($reader, 'expand')) print "skip";
22 $reader = new XMLReader();
23 $reader->XML($xmlstring);
24 while ($reader->read()) {
25 if ($reader->localName == "book") {
26 $node = $reader->expand($dom);
33 $reader->close();
H A Dvirtual_properties3.phpt13 $reader = new MyXMLReader();
16 unset($reader->attributeCount);
22 unset($reader->baseURI);
28 unset($reader->depth);
34 unset($reader->hasAttributes);
40 unset($reader->hasValue);
45 unset($reader->x);
46 var_dump(isset($reader->x));
H A Dstatic.phpt13 $reader = XMLReader::open($filename);
14 while ($reader->read()) {
15 echo $reader->name, "\n";
18 $reader = XMLReader::XML($xmlstring);
19 while ($reader->read()) {
20 echo $reader->name, "\n";
/php-src/ext/zip/examples/
H A Dodt.php3 $reader = new XMLReader(); variable
5 $reader->open('zip://' . dirname(__FILE__) . '/test.odt#meta.xml');
7 while ($reader->read()) {
8 if ($reader->nodeType == XMLREADER::ELEMENT) {
9 $elm = $reader->name;
11 if ($reader->nodeType == XMLREADER::END_ELEMENT && $reader->name == 'office:meta') {
14 if (!trim($reader->value)) {
17 $odt_meta[$elm] = $reader->value;

Completed in 32 milliseconds

123