Exemple #1
0
        public void WriteOpenElement(XmlNodeName name)
        {
            if (_needCloseElementStart)
            {
                this.Write(">");
            }

            var sname = name.ToString();

            this.Write("<", sname);
            _elements.Push(sname);

            _needCloseElementStart = true;
        }
Exemple #2
0
        public void WriteAttribute(XmlNodeName name, string value)
        {
            if (!SecurityElement.IsValidAttributeValue(value))
            {
                throw new ArgumentException();
            }

            if (!_needCloseElementStart)
            {
                throw new InvalidOperationException();
            }

            this.Write(" ", name.ToString(), "=\"", value, "\"");
        }