RSS Forums RSS
Please support our RSS, Web Services and SOAP advertiser: Programming Forums
Views: 2801 | Replies: 1
Reply
Join Date: Oct 2004
Location: Romania
Posts: 48
Reputation: m-soft is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
m-soft m-soft is offline Offline
Light Poster

xml remove <br /> tag

  #1  
Jul 31st, 2007
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!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,749
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 19
Solved Threads: 200
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: xml remove <br /> tag

  #2  
Aug 3rd, 2007
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:13 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC