Ejemplo n.º 1
0
        public string XpathSe(string URLxml, string path, string name)
        {
            string      result = "not found";
            XmlDocument doc    = new XmlDocument();

            doc.Load(URLxml);
            foreach (XmlNode row in doc.SelectNodes(path))
            {
                //string rowName = row.SelectSingleNode(name).InnerText;
                XmlAttributeCollection attributes = row.SelectSingleNode(name).Attributes;
                string rowname = attributes.ToString();
                result = rowname;
            }
            return(result);
        }