musicscore.xmlwrapper

class musicscore.xmlwrapper.XMLWrapper[source]

Bases: object

XMLWrapper contains an xml object at its core. It is the place where all the intuitive stuff is translated to attributes and children of xml objects.

All attributes and properties which are not listed in _ATTRIBUTES will be set to or get from core xml object.

to_string(*args, **kwargs) str[source]

XMLWrapper method

Calls to_string method of self.xml_object

Returns:

musicxml snippet

XMLClass = None
property xml_object: XMLElement

XMLWrapper method

This musicscore class has an equivalent MusicXML class which can be reached via this property.

If an attribute is not found directly in the main class, it wll be passed on to __get_attribute__ or __set__attribute__ methods of self.xml_object. It can also use the short cut attributes of XMLElement to get or set the first child.

Returns:

wrapped MusicXML element of type XMLClass