#43643 [Asn->Csd]: XMLReader::isValid returns false always
| From: | felipe@php.net | Date: | Fri, 28 Dec 2007 13:00:26 +0000 |
| Subject: | #43643 [Asn->Csd]: XMLReader::isValid returns false always | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-389@lists.php.net to get a copy of this message | ||
ID: 43643
Updated by: felipe@php.net
Reported By: arkadiusz dot tulodziecki at firma dot o2 dot pl
-Status: Assigned
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux
PHP Version: 5.2.5
Assigned To: felipe
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2007-12-20 17:13:47] felipe@php.net
I'll add a example soon.
------------------------------------------------------------------------
[2007-12-20 16:50:02] arkadiusz dot tulodziecki at firma dot o2 dot pl
Thanks,
There is only basic documentation for XMLReader.
There was possible other bug but because in this moment I can't
reproduce it I'll wait with reporting.
------------------------------------------------------------------------
[2007-12-20 16:04:39] felipe@php.net
Use:
$reader->setParserProperty(XMLReader::VALIDATE, true);
------------------------------------------------------------------------
[2007-12-20 15:34:47] arkadiusz dot tulodziecki at firma dot o2 dot pl
Description:
------------
XMLReader::isValid gives false for all valid XML I had. All files
parses correctly but sometimes XMLReader::read generates PHP Worning.
Reproduce code:
---------------
<?php
$reader = new XMLReader();
$reader->open('test.xml');
var_dump($reader->isValid());
?>
<?xml version="1.0" encoding="utf-8" ?>
<ads version="1.0.6" xmlns="http://www.example.com/xmlns/1.0/">
<ad offer_date="2007-08-21 21:21:00" offer_code="0"
offer_type="0">
AAA
</ad>
</ads>
Expected result:
----------------
bool(true)
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43643&edit=1