Using XML to Specify Command Line Arguments |
You can use an XML file to specify the arguments for the command line interface. You may want to do this because:
For example, you could transform your argument file to HTML for presentation on a Web page.
For example, you may want to use the pipe character ( | ) as part of a regular expression, but it causes problems when it is used at the command prompt; if you use an XML file you can use the pipe character with no problems.
This makes it easy to generate and process the XML file.
Create the XML file in the following format:
<?xml version="1.0"?> <commandline> <switch_name1/> <switch_name2>switch_value</switch_name2> .... </commandline>
For example, for the /include and /exclude switches, use the following format:
<include>objecttype:RegularExpression</include>
To execute the command line tools using an XML argument file as input, at the command prompt enter:
SQLDataCompare /argfile:XMLfilename.xml
When you use an XML file to supply the arguments, you cannot specify any other switches on the command line except /verbose or /quiet.
© Red Gate Software Ltd 2007. All Rights Reserved.