note 90236 added to simplexml.examples
| From: | bagherozzo21 at tiscali dot it | Date: | Sat, 11 Apr 2009 19:46:04 +0000 |
| Subject: | note 90236 added to simplexml.examples | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-153093@lists.php.net to get a copy of this message | ||
Hi all,
I am going mad!, I have to read an XML file and everything if fine except when I have to read a tag
that contains <!CDATA[
this is the tag:
<Description>
<![CDATA[<p>In a totally refurbished apartment building. We offer you this
furnished 1 bedroom (loft) apartment (86m2) with elevator and storage room in basement. Entrance;
hall, toilet, luxury new kitchen, one bedroom, bathroom with toilet, shower and washing machine
connection. On the Mercatorplein you will find shops and restaurants. This area is served by: tram
line(s) 7, 13. It is 15 minutes to Sloterdijk Station, 20 minutes to Central Station. Also
it&rsquo;s close to ring A10. Parking is possible, garage &euro; 112,50 per month.
<br /><br />&nbsp;</p>]]>
</Description>
and if print ( $item->Description);
its content is empty!!
If I do
print($item->Description->asXML());
I can see:
<![CDATA[<p>In a totally refurbished apartment building. We offer you this
furnished 1 bedroom (loft) apartment (86m2) with elevator and storage room in basement. Entrance;
hall, toilet, luxury new kitchen, one bedroom, bathroom with toilet, shower and washing machine
connection. On the Mercatorplein you will find shops and restaurants. This area is served by: tram
line(s) 7, 13. It is 15 minutes to Sloterdijk Station, 20 minutes to Central Station. Also
it&rsquo;s close to ring A10. Parking is possible, garage &euro; 112,50 per month.
<br /><br />&nbsp;</p>]]>
but than I do not how remove the CDATA tag,
I have tried by doing that
$tags = array("<![CDATA[", "]]>");
$notags = array("", "");
$description = str_replace($tags, $notags, $a);
but doesn't work.....
Please any suggestion will be appreciate!!
Cheers
----
Server IP: 193.95.141.37
Probable Submitter: 79.97.230.137
----
Manual Page -- http://www.php.net/manual/en/simplexml.examples.php
Edit -- https://master.php.net/note/edit/90236
Del: integrated -- https://master.php.net/note/delete/90236/integrated
Del: useless -- https://master.php.net/note/delete/90236/useless
Del: bad code -- https://master.php.net/note/delete/90236/bad+code
Del: spam -- https://master.php.net/note/delete/90236/spam
Del: non-english -- https://master.php.net/note/delete/90236/non-english
Del: in docs -- https://master.php.net/note/delete/90236/in+docs
Del: other reasons-- https://master.php.net/note/delete/90236
Reject -- https://master.php.net/note/reject/90236
Search -- https://master.php.net/manage/user-notes.php