I have one problem in appending the child in XML using VB.NET. I have one xml file like this <SOLUTION> <Project Name="Presentatx" location="C:\Documents and Settings\Administrator\My Documents\authorGen Projects\Presentatx.agn" dateofbuild="12/4/2004" /> </Project> </solution> Now next time if the user is making seond project, I want to append this xml file and just want to include the project tag with all the details of second project.I have tried also but the problem i am getting is that i am not able to append the xml file . the new project tag is coming after the solution tag "</solution>" at the end. hers is the code which i am using for appending the xml file. Pls tell me how will i solve this so that teh second project tag will come after the first project tag. Dim test As String test = "solution.xml" If File.Exists(test) Then Dim fileOut As New FileStream(test, FileMode.Append, FileAccess.Write) Dim closer As New StreamWriter(fileOut) Dim writer2 As New XmlTextWriter(closer) writer2.WriteStartElement(String.Empty, "Project", String.Empty) writer2.WriteStartAttribute(String.Empty, "Name", String.Empty) writer2.WriteString(presInfo.title) writer2.WriteEndAttribute() writer2.WriteStartAttribute(String.Empty, "location", String.Empty) writer2.WriteString(path & ".agn") writer2.WriteEndAttribute() writer2.WriteStartAttribute(String.Empty, "dateofbuild", String.Empty) writer2.WriteString(gen1) writer2.WriteEndAttribute() writer2.WriteEndElement() closer.Write(vbCrLf + "</Project>" + vbCrLf) closer.Flush() end if |