Parsing any file entered in command line using python



Problem statement is to read any xml file (format of the xml file will remain same only the content will differ) entered by the user from command line which contains number of test cases, and I need to parse it, generate another xml as a output.


Currently I am using minidom:



document = parse(sys.argv[1])


Which can read only one specific file.


I got stuck with only this part rest all is working fine.


I need to submit it as soon as possible.


No comments:

Post a Comment