-
A line "-" destroys the XML-code?
Hello
I have a strange problem. I have was sent a XML-document by my emplyoer a few weeks ago. It looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<rss xmlns:admin="http://webns.net/mvcb/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>kanal5.se - roligare TV</title>
<description>Det senaste från tv-underhållningsvärlden från Kanal 5.</description>
<link>http://www.kanal5.se</link>
<item>
<title>Bland änglar mm och träsktroll</title>
<pubDate>2007-08-17 10:30:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_ action=0&p_p_state=normal&p_p_mode=view&am p;_K5JOURNAL_VIEWER_INSTANCE_xAzU_struts_action=%2 Fk5journal%2Fview&_K5JOURNAL_VIEWER_INSTANCE_x AzU_groupId=1701&_K5JOURNAL_VIEWER_INSTANCE_xA zU_articleId=19499</link>
<dc:image>/image/image_gallery?img_id=26898</dc:image>
<dc:image-copyright>Foto: Kanal5</dc:image-copyright>
<description>Denna vecka sänds fortsättningen på såväl Shrek och Dödligt vapen, men mitt hetaste tips blir ändå sköna Charlies änglar ? utan hämningar.</description>
<guid isPermaLink="false">@2007-08-17 14:12:11.0</guid>
</item>
<item>
<title>Sparkad från succéserien</title>
<pubDate>2007-06-07 13:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_acti on=0&p_p_state=normal&p_p_mode=view&_K5JOURNAL_VIE WER_INSTANCE_xAzU_struts_action=%2Fk5journal%2Fvie w&_K5JOURNAL_VIEWER_INSTANCE_xAzU_groupId=1701&_K5 JOURNAL_VIEWER_INSTANCE_xAzU_articleId=24549</link>
<dc:image>/image/image_gallery?img_id=26380</dc:image>
<dc:image-copyright>Foto: Kanal5 SVT</dc:image-copyright>
<description>Dr. McHomofob Àr inte vÀlkommen tillbaka till Greyâ??s Anatomy i höst efter det sÃ¥ kallade â?gaybrÃ¥ketâ?. Dr. McFaggot dÀremot kan glÀdjas Ã¥t en löneförhöjning.</description>
<guid isPermaLink="false">@2007-08-28 13:51:29.0</guid>
</item>
<item>
<title>K-Fed gästspelar i One Tree Hill</title>
<pubDate>2007-08-21 11:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_ action=0&p_p_state=normal&p_p_mode=view&am p;_K5JOURNAL_VIEWER_INSTANCE_xAzU_struts_action=%2 Fk5journal%2Fview&_K5JOURNAL_VIEWER_INSTANCE_x AzU_groupId=1701&_K5JOURNAL_VIEWER_INSTANCE_xA zU_articleId=21074</link>
<dc:image>/image/image_gallery?img_id=26570</dc:image>
<dc:image-copyright>Foto: Kanal5</dc:image-copyright>
<description>Britneys struliga ex-make, Kevin Federline, 29, återupptar sin påbörjade skådiskarriär och hoppar in i ett avsnitt av tonårssåpan One Tree Hill.</description>
<guid isPermaLink="false">@2007-08-21 11:37:30.0</guid>
</item>
<item>
<title>Emma slår tillbaka med nytt tv stephanprojekt hello</title>
<pubDate>2007-08-21 13:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_ action=0&p_p_state=normal&p_p_mode=view&am p;_K5JOURNAL_VIEWER_INSTANCE_xAzU_struts_action=%2 Fk5journal%2Fview&_K5JOURNAL_VIEWER_INSTANCE_x AzU_groupId=1701&_K5JOURNAL_VIEWER_INSTANCE_xA zU_articleId=21155</link>
<dc:image>/image/image_gallery?img_id=24505</dc:image>
<dc:image-copyright>Foto: Kanal5</dc:image-copyright>
<description>Det har spekulerats i att skånepinglan Emma Andersson har varit på väg bort från tv-rutan. Nu slår hon tillbaka med full kraft.</description>
<guid isPermaLink="false">@2007-08-21 13:21:05.0</guid>
</item>
<item>
<title>Succésiffror för ID</title>
<pubDate>2007-08-21 10:30:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_ action=0&p_p_state=normal&p_p_mode=view&am p;_K5JOURNAL_VIEWER_INSTANCE_xAzU_struts_action=%2 Fk5journal%2Fview&_K5JOURNAL_VIEWER_INSTANCE_x AzU_groupId=1701&_K5JOURNAL_VIEWER_INSTANCE_xA zU_articleId=20994</link>
<dc:image>/image/image_gallery?img_id=24505</dc:image>
<dc:image-copyright>Foto: Kanal5</dc:image-copyright>
<description>Kanal 5 drog igång hösttablån i går med nya tävlingsshowen ID. Och det blev jubel på kanalen i dag när tittarsiffrorna kom.</description>
<guid isPermaLink="false">@2007-08-21 10:48:12.0</guid>
</item>
<item>
<title>24 kallar på förstärkning</title>
<pubDate>2007-08-21 10:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_ action=0&p_p_state=normal&p_p_mode=view&am p;_K5JOURNAL_VIEWER_INSTANCE_xAzU_struts_action=%2 Fk5journal%2Fview&_K5JOURNAL_VIEWER_INSTANCE_x AzU_groupId=1701&_K5JOURNAL_VIEWER_INSTANCE_xA zU_articleId=21010</link>
<dc:image>/image/image_gallery?img_id=24505</dc:image>
<dc:image-copyright>Foto: Kanal5</dc:image-copyright>
<description>Nej, det är inte Ugly Betty, men väl Janeane Garofalo som anlitats till den kommande säsongen av 24. Ett passande val kanske, när intrigerna i actionserien mest liknat ett skämt på sistone.</description>
<guid isPermaLink="false">@2007-08-21 10:50:31.0</guid>
</item>
</channel>
</rss>
I have constructed a flashfile that extracts and sorts the info from the ITEM-nodes as I want. But now my employer have sent me a new XML-file that my flashfiles will be working with. This is the new code. What I can see, it looks the same except for the lines "-" in front of the ITEM-nodes.
<?xml version="1.0" encoding="UTF-8" ?>
- <rss xmlns:admin="http://webns.net/mvcb/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
- <channel>
<title>kanal5.se - roligare TV</title>
<description>Det senaste från tv-underhållningsvärlden från Kanal 5.</description>
<link>http://w5.kanal5.se</link>
- <item>
<title>Inget Lost för Peter Stormare</title>
<pubDate>2007-09-04 11:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_acti on=0&p_p_state=normal&p_p_mode=view&_K5JOURNAL_VIE WER_INSTANCE_xAzU_struts_action=%2Fk5journal%2Fvie w&_K5JOURNAL_VIEWER_INSTANCE_xAzU_groupId=1701&_K5 JOURNAL_VIEWER_INSTANCE_xAzU_articleId=28492</link>
<dc:image>/image/image_gallery?img_id=28490</dc:image>
<dc:image-copyright>Foto: Getty Images</dc:image-copyright>
<description>Till mångas besvikelse har HollywoodstjÀrnan Peter Stormare, nyss tackat nej till en roll i Lost. Det svenska hoppet sumpar nu sin chans att lösa den omöjliga Lost-gåtan.</description>
<guid isPermaLink="false">@2007-09-04 11:47:28.0</guid>
</item>
- <item>
<title>En vampyrs bekÀnnelser</title>
<pubDate>2007-08-29 14:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_acti on=0&p_p_state=normal&p_p_mode=view&_K5JOURNAL_VIE WER_INSTANCE_xAzU_struts_action=%2Fk5journal%2Fvie w&_K5JOURNAL_VIEWER_INSTANCE_xAzU_groupId=1701&_K5 JOURNAL_VIEWER_INSTANCE_xAzU_articleId=26042</link>
<dc:image>/image/image_gallery?img_id=26029</dc:image>
<dc:image-copyright>Foto: CBS</dc:image-copyright>
<description>Nej, vampyrer sover inte i kistor. De gillar vitlök, och hÀller du heligt vatten över dem, blir de bara blöta. Det kan huvudpersonen i Moonlight intyga.</description>
<guid isPermaLink="false">@2007-08-29 14:45:43.0</guid>
</item>
- <item>
<title>TV4: Gynning ångrar sitt avhopp</title>
<pubDate>2007-09-03 09:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_acti on=0&p_p_state=normal&p_p_mode=view&_K5JOURNAL_VIE WER_INSTANCE_xAzU_struts_action=%2Fk5journal%2Fvie w&_K5JOURNAL_VIEWER_INSTANCE_xAzU_groupId=1701&_K5 JOURNAL_VIEWER_INSTANCE_xAzU_articleId=27876</link>
<dc:image>/image/image_gallery?img_id=19661</dc:image>
<dc:image-copyright>Foto: TV4.</dc:image-copyright>
<description>Mitt under brinnande Idol-inspelning lÀmnade Carolina Gynning TV4 och skrev guldkantrat kontrakt med Kanal 5. Nu påstår TV4 att Gynning ångrar sitt avhopp.</description>
<guid isPermaLink="false">@2007-09-03 09:32:37.0</guid>
</item>
- <item>
<title>Fusket i Idol</title>
<pubDate>2007-09-04 06:00:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_acti on=0&p_p_state=normal&p_p_mode=view&_K5JOURNAL_VIE WER_INSTANCE_xAzU_struts_action=%2Fk5journal%2Fvie w&_K5JOURNAL_VIEWER_INSTANCE_xAzU_groupId=1701&_K5 JOURNAL_VIEWER_INSTANCE_xAzU_articleId=28172</link>
<dc:image />
<dc:image-copyright />
<description>Sydafrikanska Idol har drabbats av en stor skandal sedan det avslöjats att en av deltagarna Àr planterad.</description>
<guid isPermaLink="false">@2007-09-03 16:05:35.0</guid>
</item>
- <item>
<title>Myggan skapar oro i kÀndissverige</title>
<pubDate>2007-08-15 10:10:00.0</pubDate>
<link>http://www.kanal5.se/web/guest/hem?p_p_id=K5JOURNAL_VIEWER_INSTANCE_xAzU&p_p_acti on=0&p_p_state=normal&p_p_mode=view&_K5JOURNAL_VIE WER_INSTANCE_xAzU_struts_action=%2Fk5journal%2Fvie w&_K5JOURNAL_VIEWER_INSTANCE_xAzU_groupId=1701&_K5 JOURNAL_VIEWER_INSTANCE_xAzU_articleId=18040</link>
<dc:image>/image/image_gallery?img_id=18038</dc:image>
<dc:image-copyright>Foto: Kanal 5.</dc:image-copyright>
<description>Povel Ramels son rasar och Tage Danielssons Ànka har kontaktat sin advokat. Innan Filip och Fredriks nya animerade serien ens haft premiÀr står skandalerna som spön i backen.</description>
<guid isPermaLink="false">@2007-08-15 10:14:35.0</guid>
</item>
</channel>
</rss>
Everything works with this new XML-file when I just remove the -. But I dont think that is an option. So my questions now are, what does the - do? Have my emplyoer done a misstake or does the - actually have a function? How can I get my code to work with all the - in place?
-
perhaps post it within [php] tags or [code] tags,- not readable right now,- or attach the xml file or link to it.
My guess is that whoever did that just copied the parsed Firefox or IE xml view and pasted it into a new document,- those "-" lines are defenitly wrong. Always edit xml files in a real editor,- not copy it from a viewer
-
OK! Then my emplyoer just made a misstake, and when he deletes the lines, everything will work. Thank you.
-
as long as it wasn´t you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|