File: xml2wbxml.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 (23 lines) | stat: -rw-r--r-- 307 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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)

out =open(sys.argv[2],"w")

doc = libxml2.parseFile(sys.argv[1])
wbxml=wbxml.XMLToWBXML(doc)
out.write(wbxml)
out.close()