"Dim nodeElement As New XElement"
New XElements. ( ),
SLaks, - ( , , , , ).
you can use
document.Root.Add(attrAndValue)
or
Dim nodeElement As XElement = document.<theXMLroot>(0)
nodeElement.Add(attrAndValue)
followed by
document.Save(theXMLSource)
both work the same way. since you use literals, I thought you might need to know the "second way." This is useful mainly because you can jump to where you want to insert the item.
eg
Dim nodeElement As XElement = document.<theXMLroot>.<parent>(0)
or
Dim nodeElement As XElement = document...<parent>(0)
hope this helps
source
share