Acme.PROJECTNAME.Install.XmlHelper.AddAttribute C# (CSharp) Method

AddAttribute() public static method

public static AddAttribute ( XmlElement XmlElement, string name, string value ) : XmlAttribute
XmlElement System.Xml.XmlElement
name string
value string
return System.Xml.XmlAttribute
		public static XmlAttribute AddAttribute(XmlElement XmlElement, string name, string value)
		{
			XmlDocument docOwner = null;
			XmlAttribute attrNew = null;

			docOwner = XmlElement.OwnerDocument;
			attrNew = docOwner.CreateAttribute(name);
			attrNew.InnerText = value;
			XmlElement.Attributes.Append(attrNew);
			return attrNew;
		}