字符串专为xml类:
XDocument xmlDocument = XDocument.Parse(xmlContent);
子代
string tablaName = xmlDocument.Descendants("TableName").ElementAt(0).Value.ToString();
string tablaName = xmlDocument.Elements("TableName").ElementAt(0).Value.ToString();
string tablaName = xmlDocument.Element("TableName").Value.ToString();
子代类型XElement
XElement xel = xmlDocument.Descendants("WorkflowProcess").ElementAt(0);
属性
string name = xel.Attribute("Name").Value.ToString();