Table Of Contents

Previous topic

music21.note

Next topic

music21.pitch

This Page

music21.node

music21.node.fixed_writexml(writer, indent=, addindent=, newl=)

Node

class music21.node.Node
>>> a = Node()
>>> a.set('charData', 'test')

Node attributes

Attributes without Documentation: charData

Node properties

tag
No documentation.

Node methods

get(name)
No documentation.
getNewDoc()
No documentation.
loadAttrs(attrs)
Given a SAX attrs object, load all atributes that are named within this object’s _attr dictionary.
merge(other, favorSelf=True)

Given another similar or commonly used Node object, combine all attributes and return a new object.

>>> a = Node()
>>> a.set('charData', 'green')
>>> b = Node()
>>> c = b.merge(a)
>>> c.get('charData')
'green'
set(name, value)
No documentation.
setDefaults()
provide defaults for all necessary attributes at this level
toxml(doc=None, parent=None, stringOut=0)
Provides XML output as either a text string or as DOM node. This method can be called recursively to build up nodes on a DOM tree. This method will assume that if an self.charData attribute has been defined this is a text element for this node. Attributes, sub entities, and sub nodes are obtained via subclassed method calls.
xmlStr()
Shortcut method to provide quick xml out.

NodeList

class music21.node.NodeList

Nodes that is designed to function as a list. In general, this is an node this only used to contain other nodes. List operations permit easy access and manipuatlooi

inherits from: Node

NodeList attributes

Attributes without Documentation: componentList

Attributes inherited from Node: charData

NodeList properties

Properties inherited from Node: tag

NodeList methods

append(item)
No documentation.

Methods inherited from Node: get(), getNewDoc(), loadAttrs(), merge(), set(), setDefaults(), toxml(), xmlStr()