How can I access a single XML element's value using C#.net web-pages with WebMatrix?
问题 I've looked at a lot of resources, done a lot of research, and tried many "best-guesses" to access a single element at a time using WebMatrix with C#, web-pages, however nothing I am trying is getting through. Consider a simple xml document that looks like this: <root> <requisitionData> <element1>I am element 1</element1> <element2>I am element 2</element2> </requisitionData> </root> I know I can use a foreach loop, like so: @using System.Xml.Linq XDocument doc = XDocument.Load(Server.MapPath