eric7/E5XML/XMLStreamReaderBase.py

branch
eric7
changeset 8319
ea11a3948f40
parent 8318
962bce857696
child 8327
666c2b81cbb7
equal deleted inserted replaced
8318:962bce857696 8319:ea11a3948f40
109 109
110 @param name name of the attribute (string) 110 @param name name of the attribute (string)
111 @param default default value (string) 111 @param default default value (string)
112 @return value of the requested tag attribute (string) 112 @return value of the requested tag attribute (string)
113 """ 113 """
114 att = self.attributes().value(name) 114 attributes = self.attributes()
115 if att == "": 115 for attribute in attributes:
116 att = default 116 if attribute.name() == name:
117 return att 117 value = attribute.value()
118 if not value:
119 value = default
120 break
121 else:
122 value = default
123 return value
124 # TODO: re-enable this code once PyQt6 is fixed and released
125 ## att = self.attributes().value(name)
126 ## if att == "":
127 ## att = default
128 ## return att
118 129
119 def _skipUnknownElement(self): 130 def _skipUnknownElement(self):
120 """ 131 """
121 Protected method to skip over all unknown elements. 132 Protected method to skip over all unknown elements.
122 """ 133 """

eric ide

mercurial