Reading Xml with XmlReader in C#

后端 未结 7 2171
南旧
南旧 2020-11-22 09:02

I\'m trying to read the following Xml document as fast as I can and let additional classes manage the reading of each sub block.


             


        
7条回答
  •  遥遥无期
    2020-11-22 09:41

        XmlDataDocument xmldoc = new XmlDataDocument();
        XmlNodeList xmlnode ;
        int i = 0;
        string str = null;
        FileStream fs = new FileStream("product.xml", FileMode.Open, FileAccess.Read);
        xmldoc.Load(fs);
        xmlnode = xmldoc.GetElementsByTagName("Product");
    

    You can loop through xmlnode and get the data...... C# XML Reader

提交回复
热议问题