Acme.Northwind.Install.XmlHelper.AddAttribute C# (CSharp) Метод

AddAttribute() публичный статический Метод

Adds an attribute to an XML node
public static AddAttribute ( XmlElement element, string name, string value ) : XmlAttribute
element System.Xml.XmlElement
name string
value string
Результат System.Xml.XmlAttribute
		public static XmlAttribute AddAttribute(XmlElement element, string name, string value)
		{
			XmlDocument docOwner = null;
			XmlAttribute newAttribute = null;

			docOwner = element.OwnerDocument;
			newAttribute = docOwner.CreateAttribute(name);
			newAttribute.InnerText = value;
			element.Attributes.Append(newAttribute);
			return newAttribute;
		}