943,946 Members | Top Members by Rank

Ad:
May 5th, 2006
0

append to XML file

Expand Post »
I was saving some data to a new XML file using the following code

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1.  
  2. Public myFileName, NewFileSave As String
  3. Dim xml As New ChilkatXml
  4. Dim outXml As New ChilkatXml
  5. Dim node As ChilkatXml
  6. Dim nextNode As ChilkatXml
  7.  
  8. Private Sub Command47_Click()
  9. CommonDialog1.ShowSave
  10. NewFileSave = CommonDialog1.FileName
  11. MsgBox NewFileSave
  12. xml.SaveXml NewFileSave
  13. MsgBox "Saved"
  14. CancelButton:
  15. Exit Sub

But now i also require to append the data to an existing XML file.

Can someone help me with the appending part.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kamitsin is offline Offline
16 posts
since Apr 2006
May 5th, 2006
0

Re: append to XML file

I've never heard of the ChilkatXml object before.... I'm guessing it's a module that perhaps you installed.... you might want to check the documentation on it, I'm sure it has an option for appending data. In VB, you can open a file for appending as such:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. open filename for append as #1
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
May 8th, 2006
0

Re: append to XML file

Yes i have installed the ChilkatXml module.

I have checked the documentation of ChilkatXml but could not get much on the appending part.

Have tried

open filename for append as #1

but in my application it is not working and is overwriting the exisitng file.

Is there any other method by which i can append to a file ???

Thanks.
Amit
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kamitsin is offline Offline
16 posts
since Apr 2006
May 8th, 2006
0

Re: append to XML file

Only if you want to get crazy, and try to do it through a dos command line...say, using shell, or making a batch file, and then shelling the batch file. Opening a file for append should never over-write anything, unless there is already nothing there. Appending a file means literally to add to the end of. I suppose you could post your code that appends, so we can check it out.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Dynamic menu
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to create a database during the runtime in VB6?!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC