ATLAS Offline Software
Loading...
Searching...
No Matches
python.output.AtlRunQueryXML.TextElement Class Reference
Inheritance diagram for python.output.AtlRunQueryXML.TextElement:
Collaboration diagram for python.output.AtlRunQueryXML.TextElement:

Public Member Functions

 __init__ (self, name, data, doc)
 setAttribute (self, attname, value)
 writexml (self, writer, indent="", addindent="", newl="")

Public Attributes

 tagName = name
 data = data
 ownerDocument = doc
list attOrder = []

Detailed Description

Definition at line 30 of file AtlRunQueryXML.py.

Constructor & Destructor Documentation

◆ __init__()

python.output.AtlRunQueryXML.TextElement.__init__ ( self,
name,
data,
doc )

Definition at line 31 of file AtlRunQueryXML.py.

31 def __init__(self,name,data,doc):
32 Element.__init__(self,name)
33 if not isinstance(data, str):
34 raise TypeError ("node contents must be a string")
35 self.tagName = name
36 self.data = data
37 self.ownerDocument = doc
38 self.attOrder = []
39

Member Function Documentation

◆ setAttribute()

python.output.AtlRunQueryXML.TextElement.setAttribute ( self,
attname,
value )

Definition at line 40 of file AtlRunQueryXML.py.

40 def setAttribute(self, attname, value):
41 if attname not in self.attOrder:
42 self.attOrder += [attname]
43 Element.setAttribute(self, attname, value)
44

◆ writexml()

python.output.AtlRunQueryXML.TextElement.writexml ( self,
writer,
indent = "",
addindent = "",
newl = "" )

Definition at line 45 of file AtlRunQueryXML.py.

45 def writexml(self, writer, indent="", addindent="", newl=""):
46 attrs = self._get_attributes()
47 atstr = ''
48 for a_name in self.attOrder:
49 atstr += ' %s="%s"' % (a_name, attrs[a_name].value)
50
51 if self.data:
52 writer.write("%s<%s%s>%s</%s>%s" % (indent, self.tagName, atstr, self.data, self.tagName, newl ) )
53 else:
54 writer.write("%s<%s%s/>%s" % (indent, self.tagName, atstr, newl ) )
55

Member Data Documentation

◆ attOrder

list python.output.AtlRunQueryXML.TextElement.attOrder = []

Definition at line 38 of file AtlRunQueryXML.py.

◆ data

python.output.AtlRunQueryXML.TextElement.data = data

Definition at line 36 of file AtlRunQueryXML.py.

◆ ownerDocument

python.output.AtlRunQueryXML.TextElement.ownerDocument = doc

Definition at line 37 of file AtlRunQueryXML.py.

◆ tagName

python.output.AtlRunQueryXML.TextElement.tagName = name

Definition at line 35 of file AtlRunQueryXML.py.


The documentation for this class was generated from the following file: