User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 402,516 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,714 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our RSS, Web Services and SOAP advertiser: Programming Forums
Views: 2500 | Replies: 1
Reply
Join Date: Oct 2004
Location: Romania
Posts: 48
Reputation: m-soft is an unknown quantity at this point 
Rep Power: 4
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,698
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: 18
Solved Threads: 195
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.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

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

DaniWeb RSS, Web Services and SOAP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the RSS, Web Services and SOAP Forum

All times are GMT -4. The time now is 6:21 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC