public string bmxmltest(string id)
        {
            string name = "";
            XmlNodeList xnl = xmlDoc.DocumentElement.ChildNodes;
            foreach (XmlNode xn in xnl)
            {
                for (int i = 0; i < xn.Attributes.Count; i++)
                {
                    XmlAttribute xa = xn.Attributes[i];
                    if (xa.Name == "id" && xa. == "zyf")
                    {
                        name = xn.InnerText;
                    }
                }
            }
            return name;
        }

---------------------------------------

        public string bmtest(string type)
        {
            string className = "";
            XmlNodeList xnl = xmlDoc.DocumentElement.ChildNodes;
            foreach(XmlNode xn in xnl)
            {
                if (xn.FirstChild.InnerText == type)
                {
                    className = xn.ChildNodes[1].InnerText;
                }
            }
            return className;
        }

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2022-01-15
  • 2021-12-26
  • 2022-02-07
  • 2021-05-23
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-08-25
  • 2021-11-02
  • 2022-03-06
  • 2022-12-23
相关资源
相似解决方案