Decoder/encoder for Konami's binary XML format
Go to file
2024-04-28 10:54:05 +10:00
.vscode Remove py2 support, format code, add type annotations, convert illegal node names 2023-10-26 18:02:31 +10:00
kbinxml Fix BrokenPipeError when piping kbinxml output 2024-04-28 10:54:05 +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 Fix BrokenPipeError when piping kbinxml output 2024-04-28 10:54:05 +10:00
testcases_out.kbin testcases: update output kbin for array alignmen test 2023-06-03 11:22:20 +10:00
testcases_out.xml testcases: add array packing/alignment test case 2023-06-02 14:40:21 +02:00
testcases.xml testcases: add array packing/alignment test case 2023-06-02 14:40:21 +02: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'