XMLCHILDCONTAINER

Warning

This documentation is still under construction!

class musicxml.xmlelement.xmlchildcontainer.XMLChildContainer(content, min_occurrences=None, max_occurrences=None, populate_children=True, *args, **kwargs)[source]

Bases: Tree

add_element(xml_element, forward=None, intelligent_choice=True)[source]
check_required_elements(intelligent_choice=False)[source]
check_requirements(intelligent_choice=False)
duplicate()[source]
get_attached_elements()[source]
get_leaves(function=None)[source]

Tree method

Parameters:

key – An optional callable to be called on each leaf.

Returns:

nested list of leaves or values of key(leaf) for each leaf

Return type:

nested list of Tree

get_parent_xml_element()[source]
Returns:

XMLElement which child container is attached to.

get_required_element_names(intelligent_choice=False)[source]
set_force_validate(node, val)[source]
property choices_in_reversed_path
property chosen_child
property compact_repr
Returns:

A compact representation of content.

property content
Returns:

Content of a XMLChildContainer is its core property. It can be of types: XSDSequence, XSDChoice, XSDGroup or XSDElement which are used to translate the behaviour of according xsd tags: sequence, choice, group and element.

property force_validate
property max_is_reached
property requirements_fulfilled