CSharp examples for System.Xml:XML Document
Creates XML Attribute and assigns a value, to the specified XmlDocument and XmlElement.
using System.Xml.Linq; using System.Linq; using System;//from w w w. j av a 2 s. c o m using System.IO; using System.Xml; using System.Collections.Generic; using System.Collections; using UnityEngine; public class Main{ /// <summary> /// Creates an Attribute and assigns a value, to the specified XmlDocument and XmlElement. /// </summary> public static void CreateAttribute(string attName, string val, ref XElement elem) { XAttribute att = new XAttribute(attName, val); elem.Add(att); } }