File: to_xml

package info (click to toggle)
pywbxml 0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,436 kB
  • ctags: 43
  • sloc: sh: 8,867; makefile: 64; python: 24
file content (16 lines) | stat: -rwxr-xr-x 356 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python

import pywbxml
from util import *
from xml.dom import minidom

as_output = "\x03\x01\x6a\x00\x00\x07\x56\x52\x03\x30\x00\x01\x01"

print "Raw (%d bytes):" % len(as_output)
print hexdump(as_output)

print "Decoded and pretty-printed:"
decoded = pywbxml.wbxml2xml(as_output)
doc = minidom.parseString(decoded)
print doc.toprettyxml()