ASKER
ASKER
Dim xmldocl As New XmlDocument
xmldocl.Load(MapPath("~/App_Data/PSW5.xml"))
Dim Nodel As XmlElement
Dim newnode As XmlElement
Nodel = xmldocl.GetElementsByTagName("FLI_INF").Item(1)
newnode = Nodel.CloneNode(True)
' Create a document fragment.
Dim docFrag As XmlDocumentFragment = xmldocl.CreateDocumentFragment()
Dim xmldoc As New XMLDocument
Dim Node As XmlElement
xmldoc.AppendChild(xmldoc.CreateXmlDeclaration("1.0", "utf-8", Nothing))
Node = xmldoc.CreateElement("SESSION")
xmldoc.AppendChild(Node)
'xmldoc.AppendChild(Nodel)
Dim xmldocg As XmlElement
xmldocg = xmldoc.GetElementsByTagName("SESSION").Item(0)
xmldocg.AppendChild(docFrag)
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
2) Get a reference to an XmlNode.
3) Remove the node from the parent node.
4) Add the node as an XmlElement to the new node.
5) Save the XmlDocument.