parse() приватный статический Метод

private static parse ( XmlNode node ) : object
node System.Xml.XmlNode
Результат object
        private static Dictionary <string, object> parseDictionary(XmlNode node)
        {
            XmlNodeList childNodes = node.ChildNodes;

            if (childNodes.Count % 2 != 0)
            {
                throw new DataMisalignedException("Dictionary elements must have an even number of child nodes");
            }
            Dictionary <string, object> dictionary = new Dictionary <string, object>();
            int index = 0;

            while (index < childNodes.Count)
            {
                XmlNode xmlNode = childNodes[index];
                XmlNode node1   = childNodes[index + 1];
                if (xmlNode.Name != "key")
                {
                    throw new ApplicationException("expected a key node");
                }
                object obj = Plist.parse(node1);
                if (obj != null)
                {
                    dictionary.Add(xmlNode.InnerText, obj);
                }
                index += 2;
            }
            return(dictionary);
        }
        private static List <object> parseArray(XmlNode node)
        {
            List <object> objectList = new List <object>();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                object obj = Plist.parse(childNode);
                if (obj != null)
                {
                    objectList.Add(obj);
                }
            }
            return(objectList);
        }
 private static object readXml(XmlDocument xml)
 {
     return((object)(Dictionary <string, object>)Plist.parse(xml.DocumentElement.ChildNodes[0]));
 }
Пример #4
0
        // Token: 0x0600010C RID: 268 RVA: 0x00006E68 File Offset: 0x00005068
        private static object readXml(XmlDocument xml)
        {
            XmlNode node = xml.DocumentElement.ChildNodes[0];

            return(Plist.parse(node));
        }