|
|
|
Click here to copy the following block |
Function CreateAppendElement(ByVal parentNode As XmlNode, ByVal name As String, _ Optional ByVal innerText As String = Nothing) As XmlElement Dim xmlEl As XmlElement = parentNode.OwnerDocument.CreateElement(name) If Not (innerText Is Nothing) Then xmlEl.InnerText = innerText parentNode.AppendChild(xmlEl) Return xmlEl End Function
Dim xmldoc As New XmlDocument() xmldoc.Load("Employees.xml")
Dim xmlEl As XmlElement = CreateAppendElement(xmldoc.DocumentElement, _ "Employee") xmlEl.SetAttribute("id", "100")
CreateAppendElement(xmlEl, "firstName", "Joe") CreateAppendElement(xmlEl, "lastName", "Doe") |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|