示例#1
0
        public static SstDocument Parse(XmlDocument xml, XmlNamespaceManager namespaceManager)
        {
            try
            {
                SstDocument sstDoc = new SstDocument();
                sstDoc.AddNewSst();
                CT_Sst sst = sstDoc.GetSst();
                sst.count       = XmlHelper.ReadInt(xml.DocumentElement.Attributes["count"]);
                sst.uniqueCount = XmlHelper.ReadInt(xml.DocumentElement.Attributes["uniqueCount"]);

                XmlNodeList nl = xml.SelectNodes("//d:sst/d:si", namespaceManager);
                if (nl != null)
                {
                    foreach (XmlNode node in nl)
                    {
                        CT_Rst rst = CT_Rst.Parse(node, namespaceManager);
                        sstDoc.sst.si.Add(rst);
                    }
                }
                return(sstDoc);
            }
            catch (XmlException e)
            {
                throw new IOException(e.Message);
            }
        }
示例#2
0
 public void AddNewSst()
 {
     this.sst = new CT_Sst();
 }
示例#3
0
 public SstDocument(CT_Sst sst)
 {
     this.sst = sst;
 }
示例#4
0
        public static SstDocument Parse(Stream in1)
        {
            CT_Sst sst = (CT_Sst)serializer.Deserialize(in1);

            return(new SstDocument(sst));
        }
示例#5
0
 public void AddNewSst()
 {
     this.sst = new CT_Sst();
 }
示例#6
0
 public SstDocument(CT_Sst sst)
 {
     this.sst = sst;
 }