XML Attributes
-
Hi! I am trying to create an XML Element that has XML attribute and appened it to and existing XML document. how do i do this? Do the prosedure is: 1)create attributes (2 - 3). 2) create Element and attach the attributes? (How?) 3) append to an Element list? Or XMLDoc? (How) Thanks :)
-
Hi! I am trying to create an XML Element that has XML attribute and appened it to and existing XML document. how do i do this? Do the prosedure is: 1)create attributes (2 - 3). 2) create Element and attach the attributes? (How?) 3) append to an Element list? Or XMLDoc? (How) Thanks :)
Yep, try it, you'll see.
-
Hi! I am trying to create an XML Element that has XML attribute and appened it to and existing XML document. how do i do this? Do the prosedure is: 1)create attributes (2 - 3). 2) create Element and attach the attributes? (How?) 3) append to an Element list? Or XMLDoc? (How) Thanks :)
- XmlAttribute myAttrib = new XmlAttribute(); myAttrib.Value = "Some value"; 2) on then XmlDocument you opened (I'm going to use xmlDoc as an example) XmlNode myNode = xmlDoc.CreateElement("tagname"); myNode.AppendChild(xmlDoc.CreateTextElement("The tag's text node Value")); 3) use the .AppendChild() as above to attach to the Document node xmlDoc.DocumentElement.AppendChild(myNode); *note* you need to use .Save() to well save the changes/appends
-Spacix All your skynet questions[^] belong to solved
-
- XmlAttribute myAttrib = new XmlAttribute(); myAttrib.Value = "Some value"; 2) on then XmlDocument you opened (I'm going to use xmlDoc as an example) XmlNode myNode = xmlDoc.CreateElement("tagname"); myNode.AppendChild(xmlDoc.CreateTextElement("The tag's text node Value")); 3) use the .AppendChild() as above to attach to the Document node xmlDoc.DocumentElement.AppendChild(myNode); *note* you need to use .Save() to well save the changes/appends
-Spacix All your skynet questions[^] belong to solved
-
look at the .Attributes.Append() method for a XmlNode...
-Spacix All your skynet questions[^] belong to solved