Parser.ParserBase.CreateTextXmlNode C# (CSharp) Method

CreateTextXmlNode() protected method

Creates an xml node for the specified text.
protected CreateTextXmlNode ( string text ) : XmlNode
text string
return System.Xml.XmlNode
        protected XmlNode CreateTextXmlNode(string text)
        {
            #region Check the arguments

            if (text == null)
                throw new ArgumentNullException("text");

            #endregion

            CheckXmlDocInitialized();

            XmlElement myTextNode = fParsedDocument.CreateElement(cTextXmlNodeName);

            XmlAttribute myValueAttribute = fParsedDocument.CreateAttribute(cValueXmlAttributeName);
            myValueAttribute.Value = text;
            myTextNode.Attributes.Append(myValueAttribute);

            return myTextNode;
        }