CData section not finished problem

Posted by tomaszs on Stack Overflow See other posts from Stack Overflow or by tomaszs
Published on 2010-05-09T15:27:17Z Indexed on 2010/05/09 16:18 UTC
Read the original article Hit count: 606

Filed under:
|
|
|
|

When I use DOMDocument::loadXML() for my XML below I get error:

Warning: DOMDocument::loadXML() [domdocument.loadxml]: CData section not finished http://www.pdclipart.org/displayimage.php?album=se in Entity,
Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag image line 7 in Entity
Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag quizz line 3 in Entity
Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag quizzes line 2 in Entity
Fatal error: Call to a member function getElementsByTagName() on a non-object 

It seems to me that my CData sections are closed but still I get this error. XML looks like this:

<?xml version="1.0" encoding="utf-8"?>
<quizzes>
<quizz>
<title><![CDATA[Title]]></title>
<descr><![CDATA[Some text here!]]></descr>
<tags><![CDATA[one tag, second tag]]></tags>
<image><![CDATA[http://www.site.org/displayimage.php?album=search&cat=0&pos=1]]></image>
<results>
<result>
<title><![CDATA[Something]]></title>
<descr><![CDATA[Some text here]]></descr>
<image><![CDATA[http://www.site.org/displayimage.php?album=search&cat=0&pos=17]]></image>
<id>1</id>
</result>
</results>
</quizz>
</quizzes>

Could you help me discover what is the problem?

© Stack Overflow or respective owner

Related posts about php

Related posts about Xml