ID: 43643
Updated by: [EMAIL PROTECTED]
Reported By: arkadiusz dot tulodziecki at firma dot o2 dot pl
Status: Open
Bug Type: XML Reader
Operating System: Linux
PHP Version: 5.2.5
New Comment:
Use:
$reader->setParserProperty(XMLReader::VALIDATE, true);
Previous Comments:
------------------------------------------------------------------------
[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