DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   RSS, Web Services and SOAP (http://www.daniweb.com/forums/forum151.html)
-   -   xml remove <br /> tag (http://www.daniweb.com/forums/thread84972.html)

m-soft Jul 31st, 2007 7:48 am
xml remove <br /> tag
 
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!

jwenting Aug 3rd, 2007 12:14 pm
Re: xml remove <br /> tag
 
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.


All times are GMT -4. The time now is 3:35 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC