-1

Hello,

I try to read a xml file with this schema:

- <item>
<title>some text</title>
<link>link</link>
- <description>
text ok
<br />
I can't see this text </description>
<imedia:thumbURL>link</imedia:thumbURL>
</item>

When I write:
echo $rss_channel["ITEMS"][$i]["DESCRIPTION"];
I can see text ok, but from <br /> I can't see nothing.

I tried to use somethink like eregi_replace("<br />", "\n", $var); but with no effect. Could you help me ?

And for <imedia:thumbURL> what channel shoud I use ?

$rss_channel["ITEMS"][$i]["imedia:thumbURL"]; or $rss_channel["ITEMS"][$i]["thumbURL"]; are not working.

Thank you!

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Sandeep1003
1

That's because the XML is corrupt.

If you want html tags contained inside an XML tag's content you should turn that entire content into a CDATA section.

0

Please make sure texts in XMLs are using proper line breaks. If you need to adjust line breaks inside XML, please put the text inside CDATA tags. Please be careful about the number of square brackets and tags as it might cause errors.

<![CDATA[Hello<br />How are you? …]]>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.