That code returns all the body elements. Great! Then I try
itemNodes = xmlDoc.SelectNodes("/rdf:RDF/item") which should select all the items, but it doesn't!! I tried several different things but i couldnt seem to get xpath to give me the child items of the rdf:RDF node.
That is something you cannot do. It is one of the limitations of XPath 1.0 (to be fixed in XPath 2.0) that you cannot change the default namespace. If you want to select items that are in a namespace, you must use a prefix. So just assign any prefix you want
to that namespace (remember, the prefixes you use don't need to match the source document).
Thanks all for your help - BTW, Sven: your solution worked prefectly
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.