User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 330,228 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,987 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 5287 | Replies: 3
Reply
Join Date: Apr 2006
Location: India
Posts: 16
Reputation: kamitsin is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kamitsin kamitsin is offline Offline
Newbie Poster

Help append to XML file

  #1  
May 5th, 2006
I was saving some data to a new XML file using the following code

 
Public myFileName, NewFileSave As String
Dim xml As New ChilkatXml
Dim outXml As New ChilkatXml
Dim node As ChilkatXml
Dim nextNode As ChilkatXml
 
Private Sub Command47_Click()
CommonDialog1.ShowSave
NewFileSave = CommonDialog1.FileName
MsgBox NewFileSave
xml.SaveXml NewFileSave
MsgBox "Saved"
CancelButton:
Exit Sub

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

Can someone help me with the appending part.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 106
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: append to XML file

  #2  
May 5th, 2006
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:
open filename for append as #1
Reply With Quote  
Join Date: Apr 2006
Location: India
Posts: 16
Reputation: kamitsin is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kamitsin kamitsin is offline Offline
Newbie Poster

Re: append to XML file

  #3  
May 8th, 2006
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
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 106
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: append to XML file

  #4  
May 8th, 2006
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 4:19 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC