예제 #1
0
        public static SstDocument Parse(XDocument xml, XmlNamespaceManager namespaceManager)
        {
            try
            {
                SstDocument sstDoc = new SstDocument();
                sstDoc.AddNewSst();
                CT_Sst sst = sstDoc.GetSst();
                sst.count       = XmlHelper.ReadInt(xml.Document.Root.Attribute("count"));
                sst.uniqueCount = XmlHelper.ReadInt(xml.Document.Root.Attribute("uniqueCount"));

                var nl = xml.XPathSelectElements("//d:sst/d:si", namespaceManager);
                if (nl != null)
                {
                    foreach (XElement 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;
 }