pyworkflow.mapper.xmlmapper module

class pyworkflow.mapper.xmlmapper.XmlMapper(filename, dictClasses=None, rootName='ALL', **args)[source]

Bases: pyworkflow.mapper.mapper.Mapper

Mapper for XML

addSubElement(parentElem, name, value=None)[source]
commit()[source]

Commit changes made to the storage

fillObject(obj, objElem)[source]
indent(elem, level=0)[source]
insert(obj)[source]

Insert a new object into the system

insertObjectWithChilds(obj, parentElem)[source]
selectAll(iterate=False)[source]

Select object from storage

selectById(objId)[source]

Retrieve an object give the id

setChildObject(obj, childName, childClass=None)[source]
setClassTag(classname, tag)[source]
setObjectId(objElem, objId)[source]
strId(objId)[source]

Create an unique id from the objId, specially for dictionaries, where all keys and values will be converted to string

updateFrom(obj)[source]

Update object data with storage info

updateTo(obj)[source]

Update storage with object info