The iXML Chunk

iXML Chunk ID = 'iXML'
Hexadecimal 0x69584D4C

Storage of iXML is by means of an additional RIFF chunk inside a Wave or other chunky file. See RIFF specifications for more information on chunky files and RIFF chunks. The RIFF system allows files to contain arbitrary blocks of data identified by a 4 character chunk ID, and a 4 byte length. Readers of such files can easily skip over chunks which they do not understand and this allows chunks to be added without breaking 3rd party software readers. Where a chunk ID is recognised, the chunk contents can be used by the reading application.

iXML is a raw text block using XML format layout. This raw text block is stored inside an iXML chunk in a RIFF file, using the standard RIFF technique. The iXML chunk can be written anywhere in the RIFF file, but most often it will appear after the audio data, since some parts of the metadata may not have been finalised until after the audio is written, and also, editing of the iXML metadata may require the chunk to grow, which will be more convenient when the iXML chunk is after the Audio. The iXML data can be stored as single byte or unicode, as a raw text dump with no specific identification at the head. Readers can either pass the entire text block to an XML parsing engine (which should figure out the encoding) or they can examine the first few bytes of the text looking for <?xml in either single or 2 byte encoding. For simplicity of the specification we have chosen not to formalise the text encoding with any identification. In almost all situations we anticipate single byte text, although we are prepared for unicode to support any 2 byte applications. Due to the nature of XML, certain characters cannot be represented within a parameter value, including the < character, which might otherwise signal to an XML parser that a new key was opening. At present, the following translations should be made when reading and writing iXML parameter values (note that the < and > which form the tags themselves should not be substituted)

< becomes &lt;
becomes &gt;
becomes &amp;

iXML is commonly encoded as UTF-8 XML which supports ASCII chars up to 0x7F and uses encoding for higher order ASCII chars. You must ensure that your text is UTF-8 encoded when it is written into iXML. If you are not using high order ASCII chars, this involves nothing at all. However if your system supports ASCII chars >0x7F, including accented chars and some symbols you will need to encode those chars into UTF-8 representations. See the 'Usage Guidelines' for more details.

An iXML chunk can be included with other types of RIFF file, for example AIFF. It is particularly useful for AIFF, since there is no current standard for including this sort of metadata in AIFF. When using iXML in AIFF, authors may wish to include the option 'BEXT' object in their iXML chunk, which allows the communication of standard Broadcast WAVE bext metadata within non Broadcast WAVE files. Similarly, an iXML resource (resource ID 1000) can be included in Sound Designer II files to communicate the same metadata in a standardised, non-file format specific manner.

Note: As with other RIFF chunks, the iXML chunk should be even byte count size. Add an additional space to the end of the iXML chunk if your byte count is odd.

See the section later in the specification about using iXML in QuickTime Movies.