public void ReadFromString(string text) { XDocument xdocument = PlistDocument.ParseXmlNoDtd(text); this.version = (string)xdocument.Root.Attribute((XName)"version"); PlistElement plistElement = PlistDocument.ReadElement(System.Xml.XPath.Extensions.XPathSelectElement((XNode)xdocument, "plist/dict")); if (plistElement == null) { throw new Exception("Error parsing plist file"); } this.root = plistElement as PlistElementDict; if (this.root == null) { throw new Exception("Malformed plist file"); } this.documentType = xdocument.DocumentType; }
public void ReadFromString(string text) { this.m_Doc = PlistDocument.ParseXmlNoDtd(text); }