ID:               29684
 Updated by:       [EMAIL PROTECTED]
 Reported By:      powerblade at mail dot dk
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: Windows XP
 PHP Version:      5CVS-2004-08-15 (dev)
 New Comment:

Have you tried using the load() method instead of 
loadXML()? DomDocument::loadXML() is for XML from a 
string, while load() is from a file. You're trying to 
parse the string 'example.com'


Previous Comments:
------------------------------------------------------------------------

[2004-08-15 00:52:21] powerblade at mail dot dk

Description:
------------
PHP simply won't load the XML file.
Whenever it loads the file, it seems like it empties it out.
I think they have the same problem here:
http://mail.gnome.org/archives/xml/2001-June/msg00153.html

Reproduce code:
---------------
index.php:

<?php


$oXML = new domdocument();
$oXML->loadXML('example.xml');
echo "done...";
?>

example.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<topic subject="Topic subject" tid="1">
        <posts>
                <post pid="1" mid="1" cdate="01-02-2003" mdate="05-04-2004"
username="PowerBlade">
                Blah blah blah
                </post>
        </posts>
</topic>


Expected result:
----------------
done...

Actual result:
--------------
Warning: DOMDocument::loadXML() [function.loadXML]: Start tag expected,
'<' not found in Entity, line: 1 in W:\Apache2\htdocs\test\index.php on
line 5
done...


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29684&edit=1

Reply via email to