Link to home
Start Free TrialLog in
Avatar of WinPE
WinPE

asked on

VBSCRIPT - Is it possible to append to an already written to xml file from vbscript?

I've got a vbscript wrapper that excutes another vbs that in turn writes out an xml file. Once that is done I would like the wrapper to append to that file a certain value.

In this case is there anyway I can add a value under the colo=""  node in the below code from vbscript?

Thanks
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="serverhtml.xsl"?>
<computer>
 <generated script="sydi-server" version="2.1" scantime="2/11/2008 12:24:27 PM" />
 <system name="ALLHANDSARCH2" colo="" reboot="2/11/2008 3:17:25 AM" />
 <operatingsystem name="Microsoft Windows Server 2003 Enterprise Edition" servicepack="Service Pack 1" />
 <fqdn name="xyz.contoso.com" />
 <roles>
  <role name="File" />
  <role name="Media" />
 </roles>

Open in new window

SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also please check whether these links give you some ideas

http://www.devguru.com/technologies/xmldom/quickref/document_save.html
http://www.devguru.com/technologies/xmldom/quickref/document_save.html

Though this link doesnt give you a straight forward method to handle xml files, this might help you to handle it as text file

http://www.visualbasicscript.com/m_28119/tm.htm
Avatar of WinPE
WinPE

ASKER

Thanks Guys!