Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VBScript to edit/revise an XML file

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,66376
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBScript to edit/revise an XML file
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VBScript to edit/revise an XML file - 11/13/2008 5:33:28 AM   
  ssmith

 

Posts: 1
Score: 0
Joined: 11/13/2008
Status: offline
I have never written any VBScript, but I have been assigned the task at work to write a script that updates an XML file.  The script is part of a job on SQL Server that will run nightly. 
Basically, I need to replace part of a XML file.  The beginning part of the file (two or three elements) and the end of the file (another two or three elements) stays the same.  But there is one element in the middle that needs to be replaced (and all of it's children.)
Like I already said, I have never written any VBScript, so I have no idea how to go about this.  Is there a way to edit part of (the middle of) a file?
Any help is greatly appreciated and thanks in advance!
 
 
Post #: 1
 
 RE: VBScript to edit/revise an XML file - 11/13/2008 5:38:19 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
It is possible to do this with regular string functions. Personally however I would look at using the XMLDOM to do it in an XML appropriate fashion. Search the forum and you should find examples of both methods. Once you hav tired some code, post back here with any problems that you are having.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ssmith)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBScript to edit/revise an XML file Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts