public string GetNodeName(string MsgName)
{
XmlNode xn = FormNode.SelectSingleNode(MsgName);
try
{
return xn.Attributes[Language].Value;
}
catch (Exception ex)
{
return "";
}
}
{
XmlNode xn = FormNode.SelectSingleNode(MsgName);
try
{
return xn.Attributes[Language].Value;
}
catch (Exception ex)
{
return "";
}
}
XmlDocument xml = new XmlDocument();
xml.Load("test.xml");
XmlNamespaceManager xnm = new XmlNamespaceManager(xml.NameTable);
xnm.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema");
string xpath = "//xs:sequence/xs:element";
XmlNodeList nodes = xml.SelectNodes(xpath, xnm);
foreach (XmlNode item in nodes)
{
string title = item.Attributes["name"].InnerText;
string type = item.Attributes["type"].InnerText;
listBox1.Items.Add(title+" "+type); }