If the XML is your program's principal input, then I strongly suggest that you read it from standard input instead of as a command-line argument (which would seem unusual in this case). This would give users of your program three ways for passing in XML:
- execute your program, and manually type in some XML
- use the output of another program:
other_program … | program …
- redirect standard input from a file:
program … < input.xml
If the XML, however, is not the main input, I'd offer a command-line switch for specifying an input file name; which gives you one way to specify the XML:
- specify the input file via parameter:
program ... -f input.xml
Apart from this advice, I cannot answer your actual question precisely, but I've noticed in the past that Windows' cmd.exe
(IIRC under Windows 2000 or XP) was fairly limited with regard to the maximum length of a command.