private List<string> ExtrXML(string XMLStr)

{

    List<string> data = new List<string>();

    System.Xml.NameTable nt = new System.Xml.NameTable();

    System.Xml.XmlNamespaceManager nsmgr = new System.Xml.XmlNamespaceManager(nt);

    System.Xml.XmlParserContext context = new System.Xml.XmlParserContext(null, nsmgr, null, System.Xml.XmlSpace.None);

    System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader(XMLStr, System.Xml.XmlNodeType.Element, context);

    while (reader.Read())

    {

        data.Add(reader.ReadString());

    }

    reader.Close();

    return data;

}

arrow
arrow
    全站熱搜

    Big Bear 發表在 痞客邦 留言(0) 人氣()