File: wbxml2xml.py

package info (click to toggle)
synce-sync-engine 0.11.1-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 996 kB
  • ctags: 923
  • sloc: python: 8,586; xml: 949; makefile: 51; sh: 7
file content (19 lines) | stat: -rw-r--r-- 332 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python

import sys
sys.path.insert(0, "..")
from SyncEngine import wbxml
import libxml2


if len(sys.argv) != 3:
    print "Invalid argument count"
    sys.exit(1)

infile = open(sys.argv[1],"r")
wb = infile.read()
out =open(sys.argv[2],"wb")
doc=wbxml.WBXMLToXML(wb)
out.write(doc.serialize("UTF-8",0))
out.close()