validate for kristina's test suite
This commit is contained in:
parent
99d45eadf9
commit
7abffdffb2
19
validate.py
Normal file
19
validate.py
Normal file
@ -0,0 +1,19 @@
|
||||
import sys
|
||||
|
||||
from bson import BSON
|
||||
from son import SON
|
||||
|
||||
def main():
|
||||
xml_file = sys.argv[1]
|
||||
out_file = sys.argv[2]
|
||||
|
||||
f = open(xml_file, "r")
|
||||
xml = f.read()
|
||||
f.close()
|
||||
|
||||
f = open(out_file, "w")
|
||||
f.write(BSON.from_dict(SON.from_xml(xml)))
|
||||
f.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Reference in New Issue
Block a user