caret
¶
|
A list of name-value pairs used in various Caret-based XML formats |
CaretMetaData
¶
- class nibabel.caret.CaretMetaData(*args, **kwargs)¶
Bases:
XmlSerializable
,MutableMapping
A list of name-value pairs used in various Caret-based XML formats
Description - Provides a simple method for user-supplied metadata that associates names with values.
Attributes: [NA]
Child Elements
MD (0…N)
Text Content: [NA]
MD elements are a single metadata entry consisting of a name and a value.
- Attributes:
- datamapping of {name: value} pairs
- >>> md = CaretMetaData()
- >>> md[‘key’] = ‘val’
- >>> md
- <CaretMetaData {‘key’: ‘val’}>
- >>> dict(md)
- {‘key’: ‘val’}
- >>> md.to_xml()
- b’<MetaData><MD><Name>key</Name><Value>val</Value></MD></MetaData>’
- Objects may be constructed like any ``dict``:
- >>> md = CaretMetaData(key=’val’)
- >>> md.to_xml()
- b’<MetaData><MD><Name>key</Name><Value>val</Value></MD></MetaData>’
- __init__(*args, **kwargs)¶