Hello, How do I parse a RSS feed with elements like <foo:bar ...> (like "<rdf:RDF ...>")? How should the XPath query be?
The feed: <?xml version="1.0" encoding="ISO-8859-1" ?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:admin="http://webns.net/mvcb/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"> <item rdf:about="http://www.myUrl.com/"> <title>myTitle</title> <link>http://www.someUrl.com/</link> <description>myDescription</description> <dc:date>myDate</dc:date> </item> </rdf:RDF> Here is my code. When myQuery = "/", I get all the content of the file. When I try to select an item, I get 0 nodes returned. I think the problem is the RDF namespace, but how do I fix it? XPathDocument doc = new XPathDocument("http://localhost/myFeed.xml"); XPathNavigator nav = doc.CreateNavigator(); XPathNodeIterator items = nav.Select(myQuery); while (items.MoveNext()) { Console.WriteLine(items.Current.Value.ToString()); } Thanks in advance. Helge Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
