DotNetXri.Client.Saml.Attribute.toDOM C# (CSharp) Method

toDOM() public method

public toDOM ( XmlDocument oDoc ) : XmlElement
oDoc System.Xml.XmlDocument
return System.Xml.XmlElement
        public XmlElement toDOM(XmlDocument oDoc)
        {
            // for this particular toDOM implementation, oDoc must not be null
            if (oDoc == null)
            {
            return null;
            }

            XmlElement oElem = oDoc.createElementNS(Tags.NS_SAML, Tags.TAG_ATTRIBUTE);

            if (!msName.Equals(""))
            {
            oElem.setAttributeNS(null, Tags.ATTR_NAME, msName);
            }

            XmlElement oValElem =
            oDoc.createElementNS(Tags.NS_SAML, Tags.TAG_ATTRIBUTEVALUE);
            oValElem.AppendChild(oDoc.CreateTextNode(msValue));

            oElem.AppendChild(oValElem);

            return oElem;
        }