I am storing a xml in a string and using Xdocument i am parsing the string to xml from that i need to get xml element values and using that values i need to insert it in db. Any
Use this:
string value = xd.Root.Element("SellerSKU").Value;
You should use the xml namespace http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/
var xDoc = XDocument.Parse(xml);
XNamespace ns = "http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/";
var condition = (string)xDoc.Descendants(ns + "Condition").First();
OR
you can search for Tag
Condition in any xml namespace
var condition2 = (string)xDoc.Descendants()
.First(d => d.Name.LocalName == "Condition");
OR
you can use XPath to get Condition in any xml namespace
var condition3 = (string)xDoc.XPathSelectElement("//*[local-name()='Condition']");