This sample demonstrates reading and writing XML documents from a build, and accessing a web service via the Microsoft SOAP toolkit.
Repeat some steps once for each line of a file. This could also be used to build the steps once for each record in a database, an XML document, etc.
Process XML config data
-1
UTF-8
%WRITE_XML_FILE%
ProjA
1.2.3
ProjB
2.3.4
myfile.dll
myfile2.dll
myexe.exe
]]>
Create an XML file with configuration data
1
Gen XML file
VBScript
Populate a macro with file object for the file we created. This could also be replaced by code to iterate over an XML document, an ADO recordset, etc.
1
Query for nodes
6
-1
Process each member of node list
1
Process each node
VBScript
Populate temporary macros with XML element's attributes
2
Retrieve node values
Log the temporary macro values
2
Do stuff with node values
1
%FILENAMES%
-1
Process each file_name that was found
1
Process filenames
VBScript
Retrieve next filename into temporary macro
2
Get next filename
Next filename = %FILENAME%
2
Do stuff with filename
Namespaces
%WRITE_XML_FILE%
The Tempest
15.95
The Brothers Karamazov
23.50
Creepy Crawlies
22.95
]]>
Create a sample config file with values of 'blah'
1
Create XML file
Log the file contents with new values
1
Show original file
-1
%WRITE_XML_FILE%
0
15.05
/BOOKS/BOOK/PRICE
1
Update elem (no namespace)
currency
-1
%WRITE_XML_FILE%
0
Yen
/BOOKS/BOOK/PRICE
1
Update attr (no namespace)
-1
%WRITE_XML_FILE%
0
bk
book
23.00
/BOOKS/bk:BOOK/bk:PRICE
1
Update elem (default namespace)
bk:currency
-1
%WRITE_XML_FILE%
0
bk
book
Euro
/BOOKS/bk:BOOK/bk:PRICE
1
Update attr (default namespace)
-1
%WRITE_XML_FILE%
0
bk
money
book2
money
14.95
/BOOKS/bk:BOOK/bk:PRICE
1
Update elem (named namespace)
money:currency
-1
%WRITE_XML_FILE%
0
bk
money
book2
money
Dollar
/BOOKS/bk:BOOK/bk:PRICE
1
Update attr (named namespace)
Display the macro value
1
Read values
Log the file contents with new values
1
Show updated file
%PROJDIR%\RegEdit.bld
%TEMP%\test.xml