140 Chapter 4 " Using XML in the .NET Framework it pretty much goes hand in hand with the XmlElement class.The XmlAttribute class represents an attribute in an XML element.The XmlAttribute class inherits from XmlNode, and also provides a bit of additional functionality on top of what XmlNode  provides. See Table 4.15 for a list of these properties. Table 4.15  XmlAttribute Additional Properties Type Name Description Property OwnerElement Gets the XmlElement that contains this attribute. Property Specified Gets or sets a value indicating if this attribute value was explicitly set. Being a relatively simple type of node in an XML document, the XmlAttribute class doesnt have much specialized functionality. See Figure 4.14 for an example of how to use the XmlElement and XmlAttribute classes (the source code for this can be found in the XmlAttributeElementProject folder at www.syngress.com/solutions). Figure 4.14  XmlElement and XmlAttribute Example using System; using System.Xml; namespace XmlAttributeElementProject { class Class1 { static void Main(string[] args) { XmlDocument myDoc = new XmlDocument(); XmlElement myRoot = myDoc.CreateElement("rootElement"); myDoc.AppendChild(myRoot); XmlElement myElement = myDoc.CreateElement("subElement"); myRoot.AppendChild(myElement); www.syngress.com Continued 155_xml_net_pd_C04.qk  3/6/02  1:57 PM  Page 140