Home
last modified time | relevance | path

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

123

/PHP-7.4/ext/xmlreader/tests/
H A D003-mb.phpt13 $reader = new XMLReader();
19 while ($reader->read()) {
21 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
23 echo $reader->name . ": ";
26 if ($reader->getAttribute($reader->name) == $reader->value) {
32 echo $reader->name . ": ";
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();
19 while ($reader->read()) {
21 if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
23 echo $reader->name . ": ";
26 if ($reader->getAttribute($reader->name) == $reader->value) {
32 echo $reader->name . ": ";
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 Dnext_basic.phpt11 $reader = new XMLReader();
12 $reader->read();
13 $reader->next();
14 $reader->close();
16 $reader->XML($xml);
17 $reader->read();
18 $reader->read();
19 echo $reader->name . PHP_EOL;
22 var_dump($reader->next());
26 var_dump($reader->next());
[all …]
H A D013.phpt17 $reader = new XMLReader();
18 $reader->XML($xml);
20 while($reader->read()) {
21 if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'item') {
22 $reader->read();
23 var_dump($reader->value);
26 $reader->close();
37 $reader = new XMLReader();
38 $reader->XML($xml);
40 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.phpt5 $reader = new XMLReader();
14 $reader = new XMLReader();
15 $reader->XML($xmlstring);
16 $reader->read();
17 echo $reader->readInnerXml();
19 $reader->close();
22 $reader = new XMLReader();
23 $reader->XML($xmlstring);
24 $reader->read();
25 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 D002.phpt12 $reader = new XMLReader();
13 if ($reader->open('')) exit();
15 $reader = new XMLReader();
16 if (!$reader->open($filename)) {
17 $reader->close();
22 while ($reader->read()) {
23 echo $reader->name."\n";
25 $reader->close();
28 $reader = new XMLReader();
29 $reader->open($filename);
[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";
37 echo $reader->name . ": ";
44 echo $reader->name . ": ";
51 echo $reader->name . ": ";
[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-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";
37 echo $reader->name . ": ";
44 echo $reader->name . ": ";
51 echo $reader->name . "\n";
[all …]
H A Dexpand_error.phpt6 $reader = new XMLReader();
7 if (!method_exists($reader, 'expand')) print "skip";
15 $reader = new XMLReader();
16 var_dump($reader->expand());
17 $reader->close();
19 $reader = new XMLReader();
20 $reader->XML($xmlstring);
21 var_dump($reader->expand());
22 $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 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 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 DsetSchema_error.phpt8 $reader = new XMLReader();
9 var_dump($reader->setSchema(''));
10 $reader->close();
12 $reader = new XMLReader();
13 var_dump($reader->setSchema('schema-missing-file.xsd'));
14 $reader->close();
16 $reader = new XMLReader();
17 var_dump($reader->setSchema('schema-empty.xsd'));
18 $reader->close();
H A Dexpand.phpt6 $reader = new XMLReader();
7 if (!method_exists($reader, 'expand')) print "skip";
21 $reader = new XMLReader();
22 $reader->XML($xmlstring);
23 while ($reader->read()) {
24 if ($reader->localName == "book") {
25 $node = $reader->expand($dom);
32 $reader->close();
H A D015-get-errors.phpt16 $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->moveToNextAttribute();
29 $attr = $reader->getAttributeNs('idx', null);
31 echo $reader->name . ": ";
32 echo $reader->value . "\n";
38 $reader->close();
H A D001.phpt11 $reader = new XMLReader();
12 $reader->XML($xmlstring);
15 while ($reader->read()) {
16 echo $reader->name."\n";
19 $reader = new XMLReader();
20 $reader->XML($xmlstring);
H A D014.phpt16 $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') {
27 $reader->value = 'movie1';
29 $attr = $reader->moveToFirstAttribute();
30 $reader->value = 'num attribute 1';
32 $reader->name = 'number';
38 $reader->close();
/PHP-7.4/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 49 milliseconds

123