Beispiel #1
0
        internal KMLTimeStamp(XmlElement element, KMLFile source)
            : base(element, source)
        {
            bool blWhenSet = false;

            foreach (XmlNode oChild in element.ChildNodes)
            {
                if (oChild.NodeType != XmlNodeType.Element) continue;
                XmlElement oChildElement = oChild as XmlElement;

                if (oChildElement.Name.Equals("when"))
                {
                    m_oWhen = new KMLDateTime(oChildElement.InnerText);
                    blWhenSet = true;
                }
            }

            if (!blWhenSet) throw new ArgumentException("The KML file contains a 'TimeStamp' element without a 'when' element.");
        }
Beispiel #2
0
        internal KMLTimeSpan(XmlElement element, KMLFile source)
            : base(element, source)
        {
            foreach (XmlNode oChild in element.ChildNodes)
            {
                if (oChild.NodeType != XmlNodeType.Element) continue;
                XmlElement oChildElement = oChild as XmlElement;

                if (oChild.Name.Equals("begin"))
                {
                    m_oBegin = new KMLDateTime(oChildElement.InnerText);
                }
                else if (oChild.Name.Equals("end"))
                {
                    m_oEnd = new KMLDateTime(oChildElement.InnerText);
                }
            }
        }