skbot.ignition.sdformat.dumps

skbot.ignition.sdformat.dumps(root_element, *, format=False)[source]

Serialize a SDFormat object to an XML string.

Parameters
root_elementobject

An instance of skbot.ignition.models.vXX.Sdf. XX represents the SDFormat version and can be any version currently supported by scikit-bot.

formatbool

If true, add indentation and linebreaks to the output to increase human readability. If false (default) the entire XML will appear as a single line with no spaces between elements.

Returns
sdformat_stringstr

A string containing SDFormat XML representing the given input.

Examples

Return type

str