Decoder/encoder for Konami's binary XML format
Go to file
2021-05-03 22:33:39 +10:00
kbinxml is_binary_xml: don't explode on too-short inputs 2021-05-03 22:32:27 +10:00
.gitignore PyPi! 2018-01-09 17:05:30 +10:00
LICENSE Create LICENSE 2018-01-07 22:41:52 +10:00
README.md PyPi! 2018-01-09 17:05:30 +10:00
setup.py Bump version to 1.7 2021-05-03 22:33:39 +10:00
testcases_out.kbin Fix unicode in attr values 2017-07-21 01:00:13 +10:00
testcases_out.xml Fix unicode in attr values 2017-07-21 01:00:13 +10:00
testcases.xml Fix unicode in attr values 2017-07-21 01:00:13 +10:00

kbinxml

An encoder/decoder for Konami's binary XML format, used in some of their games.

Setup:

pip install kbinxml

You can use kbinxml from the commandline to convert files.

Python usage:

In [1]: from kbinxml import KBinXML
In [2]: text = KBinXML('<?xml version="1.0"?><root __type="str">Hello, world!</root>')
In [3]: text.to_binary()
Out[4]: b'\xa0B\x80\x7f\x00\x00\x00\x08\x0b\x04\xdfM9\xfe\xff\x00\x00\x00\x00\x14\x00\x00\x00\x0eHello, world!\x00\x00\x00'

In [5]: bin = KBinXML(Out[4])
In [6]: bin.to_text()
Out[7]: u'<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<root __type="str">Hello, world!</root>\n'