0

I am using .NET Framework 2 and I am unable to use LINQ to XML. What would be the best way to execute the equivalent of a SQL SELECT that returns multiple columns from a XML file loaded into a XmlDocument object?

3

1 Answer 1

4

Use XPath and the SelectNodes function:

From the article linked:

System.Xml.XmlNodeList MSPressBookList = xmldoc.SelectNodes("//Publisher[. = 'MSPress']/parent::node()/Title");

http://support.microsoft.com/kb/318499

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.