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); } }
public void AddNewSst() { this.sst = new CT_Sst(); }
public SstDocument(CT_Sst sst) { this.sst = sst; }