Re: [Simple-support] Duplicate element error parsing rss and atom
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2013-08-28 08:17:52
|
One thing to note, is that namespaces do not form part of the document structure according to the XML specification so <x:link> <y:link> <z:link> are all just <link> the namespace only qualifies it. Use an @ElementList with inline=true and it will pick up both links, you can then use the one that you want. Alternatively you can parse it yourself with a Converter. ________________________________ From: terry turner <tn...@na...> To: sim...@li... Sent: Wednesday, 28 August 2013 5:47 PM Subject: [Simple-support] Duplicate element error parsing rss and atom this is a well designed api but i'm having what seems to be a common problem deserializing xml that contains elements with the same name but in different name spaces. the usual example is <rss > <channel> ... <link>some value</link> ... <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/..."/> the 'link' in <atom:link> collides with <link> first question: is there any way to parse this with the current version of simpleXml? as no one that has asked this question has received an answer i'm assuming there is no way to do it now. that leads to my second question: how hard is this to support? is it something that an above average java developer (that's me) could get done relatively quickly? or is it a big design change to support these name space name collisions? thanks, terry ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |