Bayonetta 2 Binary XML (bxm files) - Kerilk/bayonetta_tools GitHub Wiki

bxm files present in Bayonetta 2. They are especially interesting as they give an XML representation of some files rather then a binary representation. The XML data is compressed. They can be decoded using Bayonetta 2 bxm.bt or for xml output: bxm_decoder.rb

Header

bxm files start with a 16 byte header.

offset size c type description
0x00 4 char[4] "XML\x00" or "BXM\x00"
0x04 4 uint32_t seems to be flags
0x08 2 uint16_t node count
0x0A 2 uint16_t data count
0x0C 4 uint32_t data size

Node Info

Directly following the header (at offset 0x10) is the node info. This is a list of structures of 8 bytes, one for each node, densely packed.

offset size c type description
0x00 2 uint16_t child count
0x02 2 uint16_t first child index or next sibling list index
0x04 2 uint16_t attribute count.
0x06 2 uint16_t data index. Offset inside the data offset table, for node data and attributes.

Data Offsets

Directly following the node info (offset: 0x10 + 8 * nodeCount). This is a list of structures of 4 bytes, one for each data, densely packed.

offset size c type description
0x00 2 uint16_t name offset
0x02 2 uint16_t value offset

Data

A list of zero terminated C strings (offset: 0x10 + 8 * nodeCount + 4 * dataCount). Its size is given in the header. Offsets inside this blob are given in the previous table.