ID: 14739
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: DOM XML related
Operating System: Linux
PHP Version: 4.1.0
New Comment:
I even get a segfault with your sample under 4.1.0 but this is fixed in 4.1.1
Except that ATTLIST is not supported the xmltree() works for me (i.e. I don't get
false back with 4.1.1).
I'm closing it as there's already a feature request open for ATTLIST.
Previous Comments:
------------------------------------------------------------------------
[2001-12-28 13:45:23] [EMAIL PROTECTED]
Here is a "short" exemple:
<pre>
$myXML = '<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE x_msgl[
<!ELEMENT x_msgl (cdsdata|cdserr)>
<!ATTLIST x_msgl
p2 CDATA #REQUIRED
p3 CDATA #REQUIRED
p4 CDATA #REQUIRED
p5 CDATA #REQUIRED
p6 CDATA #REQUIRED
p7 CDATA #REQUIRED>
<!ELEMENT cdsdata (headers)>
<!ELEMENT headers (header+)>
<!ATTLIST headers
count CDATA #REQUIRED>
<!ELEMENT header (date,time,category,title, keywords)>
<!ATTLIST header
id CDATA #REQUIRED>
<!ELEMENT date (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT category (dutch, french)>
<!ATTLIST category
id CDATA #REQUIRED>
<!ELEMENT dutch (#PCDATA)>
<!ELEMENT french (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT keywords (keyword*)>
<!ATTLIST keywords
count CDATA #REQUIRED>
<!ELEMENT keyword (#PCDATA)>
<!ATTLIST keyword
id CDATA #REQUIRED>
<!ELEMENT cdserr (#PCDATA)>
]>
<x_msgl p2="nl" p3="7" p4="53" p5="0" p6="0" p7="1" >
<cdsdata>
<headers count="1">
<header id="26466">
<date>20011228</date>
<time>1903</time>
<category id="7">
<dutch>Economie</dutch>
<french>Economie</french>
</category>
<title>VGAirlines vliegt vanaf maart dagelijks naar New York</title>
<keywords count="8">
<keyword id="5">BELGABRIEF</keyword>
<keyword id="53">ECONOMIE</keyword>
<keyword id="51">BELGIE</keyword>
<keyword id="44">BEDRIJVEN</keyword>
<keyword id="78">LUCHTVAART</keyword>
<keyword id="1255">TRANSPORT</keyword>
<keyword id="835">AGENDA</keyword>
<keyword id="7">VS</keyword>
</keywords>
</header>
</headers>
</cdsdata>
</x_msgl>';
$docTree = xmltree($myXML);
print("< pre>");
var_dump($docTree);
print( "</ pre>" );
</pre>
------------------------------------------------------------------------
[2001-12-28 13:20:26] [EMAIL PROTECTED]
Please provide a short, self-contained example for further references (you know,
single php file with xml source in a variable and then you call xmltree).
Fedback.
------------------------------------------------------------------------
[2001-12-28 12:26:51] [EMAIL PROTECTED]
The xmltree function works very well (faster and shorter to write) but it seems that
there is a problem when the DTD is in the header of the xml source.
I know it's an experimental function and I know that XML it's not fixed. I just wanted
to notice you this little problem.
In my case when the DTD is send in the header, the xmltree function return false.
Well ... I will not use and abuse of this wonderful function right now.
This bug was not mentionned in the 4.1.0 -> 4.1.1 modification list. So it's probably
still in.
Thanks anyway for reading this mail.
Regards.
P.S.: sorry for the English :)
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14739&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]