finally can append to it but the type atettbuirs 1 will write to the tag once i re-run the program Is that any way where it will continue the numbers instead of starting from 1 .Currently Xml file: ok1no2 Not I wanted Peter7 Hope to become: ok1no2 This is what I wanted Peter7 My Coding:Dim m As String = 1 Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim doc As New Xml.XmlDocument load file doc.Load( data.xml ) Dim root As XmlNode = doc.SelectSingleNode( //Books ) If root Is Nothing Then if this is a new document create root root = doc.SelectSingleNode( //Books ) Else create node get root node named users Dim Usersnode As Xml.XmlElement = doc.SelectSingleNode( //Books ) add the new node Dim newNode As Xml.XmlElement = doc.CreateElement( Book ) add atettbuirs newNode.SetAttribute( type , m) add children nodes if any Dim child As Xml.XmlElement = doc.CreateElement( Author ) child.InnerText = txtAuthor.Text newNode.AppendChild(child) child = doc.CreateElement( Section ) child.InnerText = txtSection.Text newNode.AppendChild(child) add new node to users node Usersnode.AppendChild(newNode) m += 1 End If save doc doc.Save( data.xml ) End SubThanks Was this answer helpful?