I am just trying to get the value from MessageInfo.. Sender here is an excerpt of the xml. I just want the \"Senders\" value. I have tried many different things with XDocument,
You have a namespace that you have to use.
XNamespace ns = "http://www.nwpp.org/eide";
var query1 = doc.Descendants(ns +"MessageInfo").Select(s => new MessageInfo
{
SYSGENID = s.Element(ns +"SysGenID").Value,
TIME_STAMP = s.Element(ns +"TimeStamp").Value,
SENDER = s.Element(ns +"Sender").Value,
RECEIVER = s.Element(ns +"Receiver").Value,
ENTITY_CODE = s.Element(ns +"EntityCode").Value
}).FirstOrDefault();