pyampact.symbolicUtils.indentMEI
- pyampact.symbolicUtils.indentMEI(elem, indentation='\t', _level=0)[source]
Indent an MEI (Music Encoding Initiative) XML element and its children.
This function recursively indents an XML element and its children for pretty printing. The indentation level is increased for each level of depth in the XML tree.
Parameters: elem (xml.etree.ElementTree.Element): The XML element to indent. indentation (str, optional): The indentation string to use. Default is a
tab character. Use a ‘ ‘ (space) for maximally compact output.
- _level (int, optional): The initial indentation level. This parameter is used
internally in recursive calls but should not be set by the user.
Returns: None. The function modifies the XML element in place.