Пример #1
0
 public override void WriteXml(XmlWriter writer)
 {
     writer.WriteElementString("Title", Namespace, Title);
     writer.WriteStartElement("OnlineResource", Namespace);
     OnlineResource.WriteXml(writer);
     writer.WriteEndElement();
     writer.WriteStartElement("LogoURL", Namespace);
     LogoURL.WriteXml(writer);
     writer.WriteEndElement();
 }
Пример #2
0
        public override void WriteXml(XmlWriter writer)
        {
            writer.WriteElementString("Name", Namespace, Name.ToString());
            writer.WriteElementString("Title", Namespace, Title);
            if (!string.IsNullOrEmpty(Abstract))
            {
                writer.WriteElementString("Abstract", Namespace, Abstract);
            }
            if (_keywordListField != null && _keywordListField.Keyword.Count > 0)
            {
                writer.WriteStartElement("KeywordList", Namespace);
                KeywordList.WriteXml(writer);
                writer.WriteEndElement();
            }

            writer.WriteStartElement("OnlineResource", Namespace);
            OnlineResource.WriteXml(writer);
            writer.WriteEndElement();

            if (_contactInformationField != null)
            {
                writer.WriteStartElement("ContactInformation", Namespace);
                _contactInformationField.WriteXml(writer);
                writer.WriteEndElement();
            }

            if (!string.IsNullOrEmpty(Fees))
            {
                writer.WriteElementString("Fees", Namespace, Fees);
            }

            if (!string.IsNullOrEmpty(AccessConstraints))
            {
                writer.WriteElementString("AccessConstraints", Namespace, AccessConstraints);
            }

            if (LayerLimit.HasValue)
            {
                writer.WriteElementString("LayerLimit", Namespace, LayerLimit.Value.ToString());
            }
            if (MaxWidth.HasValue)
            {
                writer.WriteElementString("MaxWidth", Namespace, MaxWidth.Value.ToString());
            }
            if (MaxHeight.HasValue)
            {
                writer.WriteElementString("MaxHeight", Namespace, MaxHeight.Value.ToString());
            }
        }