orbit.utils.xml.XmlDataAdaptor#

class orbit.utils.xml.XmlDataAdaptor(name='root')[source]#
__init__(name='root')[source]#

The XmlDataAdaptor constructor. The default name is ‘root’. It is an analog of the XAL XmlDataAdaptor class. The Attributes are replaced by parameters.

Methods

__init__([name])

The XmlDataAdaptor constructor.

adaptorForFile(file_name)

returns the new data adaptor created from the input file

adaptorForString(txt)

returns the new data adaptor created from the input text

addChildAdaptor(adaptor[, index])

Adds or inserts the adaptor as a child

addParam(key, value)

Method.

attributes()

return the list of attributes

booleanArrayValue(attribute)

array of booleans associated with the specified attribute

booleanValue(attribute)

boolean value associated with the specified attribute

childAdaptors([name])

return the array of child node adaptors.

clean()

Remove all data.

createChild(name)

create and return the new child data adaptor

doubleArrayValue(attribute)

array of doubles associated with the specified attribute

doubleValue(attribute)

double value associated with the specified attribute

getAttributes()

Returns list of attributes.

getDeepCopy()

Returns the deep copy of the XmlDataAdaptor.

getName()

Method.

getParam(key)

Method.

getParamsDict()

Method.

hasAttribute(attribute)

Returns true or false if the node has the specified attribute

hasParam(key)

Method.

intArrayValue(attribute)

array of integers associated with the specified attribute

intValue(attribute)

integer value associated with the specified attribute

keys()

return the list of the keys for the parameters

makeXmlText()

create the xml text from the document

nodeCount()

return the number of child node adaptors

removeAttribute(attribute)

remove the particular attribute

removeParam(key)

Method.

setAllChildAdaptors([data_adaptors])

Replace all adapters from the external list

setName([name])

Method.

setParam(key, value)

Method.

setParamsDict(params)

Method.

setValue(attribute, value)

set the value for the attribute

stringValue(attribute)

string value associated with the specified attribute

updateParamsDict(params)

Method.

writeToFile(file_name)

write the xml document to the file