public void LoadFromXml (XmlReader reader)
		{
			reader.ReadToDescendant ("plist");
			while (reader.Read () && reader.NodeType != XmlNodeType.Element);
			if (!reader.EOF)
				root = LoadFromNode (reader);
		}
Exemple #2
0
 public void LoadFromXml(XmlReader reader)
 {
     reader.ReadToDescendant("plist");
     while (reader.Read() && reader.NodeType != XmlNodeType.Element)
     {
         ;
     }
     if (!reader.EOF)
     {
         root = LoadFromNode(reader);
     }
 }
Exemple #3
0
 private PlistDictionary LoadDictionaryContents(XmlReader reader, PlistDictionary dict)
 {
     Debug.Assert(reader.NodeType == XmlNodeType.Element && reader.LocalName == "key");
     while (!reader.EOF && reader.NodeType == XmlNodeType.Element)
     {
         string key = reader.ReadElementString();
         while (reader.NodeType != XmlNodeType.Element && reader.Read())
         {
             if (reader.NodeType == XmlNodeType.EndElement)
             {
                 throw new Exception(String.Format("No value found for key {0}", key));
             }
         }
         PlistObjectBase result = LoadFromNode(reader);
         if (result != null)
         {
             dict.Add(key, result);
         }
         reader.ReadToNextSibling("key");
     }
     return(dict);
 }
		static void SetIfNotPresent (PlistDictionary dict, string key, PlistObjectBase value)
		{
			if (!dict.ContainsKey (key))
				dict[key] = value;
		}
		public PlistDocument (PlistObjectBase root)
		{
			this.root = root;
		}
Exemple #6
0
 public PlistDocument(PlistObjectBase root)
 {
     this.root = root;
 }