If the RSS item contents is something like this (irrelevant nodes omitted).
Up vote 0 down vote favorite share g+ share fb share tw.
Specifically I want to access the xCal:x-calconnect-venue-name node. My parent node is 'item', so the path is: item/xCal:x-calconnect-venue/xCal:adr/xCal:x-calconnect-venue-name How can I use parent.SelectChildNode() to access the value of that node? Many thanks be xpath ical link|improve this question asked Mar 16 '10 at 12:47Ben Dykes335 20% accept rate.
Please include some code as context and to show what you've been trying. – Tomalak Mar 16 '10 at 13:15 Good point Tomalak, its from asp.net C# – Ben Dykes Mar 16 '10 at 14:42 To my knowledge there is no SelectChildNode() function in the entire . NET framework.
To Bing's knowledge neither: social.msdn.microsoft.com/Search/… So - what are you working with? – Tomalak Mar 16 '10 at 14:46 Forgive me Tomalak, that was a typo on my part the actual method is called SelectSingleNode() so: XmlNodeList nodes = xmlDoc. SelectNodes("rss/channel/item"); foreach (XmlNode node in nodes) { string s = node.
SelectSingleNode("//@x-calconnect-venue-name"). InnerText; } – Ben Dykes Mar 16 '10 at 17:10 Have you noticed that you can edit your own questions? Much better than cramming additions into comments.
;) – Tomalak Mar 16 '10 at 17:42.
If the RSS item contents is something like this (irrelevant nodes omitted) venue name Then you could do XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc. XmlDoc); nsmgr. AddNamespace("xCal", "urn:ietf:params:xml:ns:xcal"); // possibly add the RSS namespace as well?
XmlNodeList nodes = xmlDoc. SelectNodes("rss/channel/item"); foreach (XmlNode node in nodes) { XmlNode venue = node. SelectSingleNode(".
//xCal:x-calconnect-venue-name", nsmgr); // watch out, there might not be a select result! If (venue! = null) { string s = venue.
InnerText; // ... } } or directly string xpath = "rss/channel/item//xCal:x-calconnect-venue-name"; XmlNodeList nodes = xmlDoc. SelectNodes(xpath, nsmgr); foreach (XmlNode venue in nodes) { string s = venue. InnerText; // ... }.
Fantastic, thank you Tomalak, I will give that try! – Ben Dykes Mar 16 '10 at 21:55 1 Just to follow up, thanks again Tomalak this worked perfectly. Much appreciated.
– Ben Dykes Mar 17 '10 at 18:20 @user: Thanks for the follow-up, glad that it worked. P.S.: An up-vote and an accept for this answer would be very much appreciated on my end. ;-) – Tomalak Mar 17 '10 at 19:00.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.