def writeConstantXML(self, elem):
    lines = []
    assert isinstance(elem, autosar.constant.Constant)
    lines.append('<CONSTANT-SPECIFICATION>')
    lines.append(self.indent(('<SHORT-NAME>%s</SHORT-NAME>' % elem.name), 1))
    if (elem.adminData is not None):
        lines.extend(self.indent(self.writeAdminDataXML(elem.adminData), 1))
    if (self.version >= 4.0):
        lines.extend(self.indent(self._writeValueXMLV4(elem.value), 1))
    else:
        lines.extend(self.indent(self._writeValueXMLV3(elem.value), 1))
    lines.append('</CONSTANT-SPECIFICATION>')
    return lines
def writeConstantXML(self, elem):
    lines = []
    assert isinstance(elem, autosar.constant.Constant)
    lines.append('<CONSTANT-SPECIFICATION>')
    lines.append(self.indent(('<SHORT-NAME>%s</SHORT-NAME>' % elem.name), 1))
    if (elem.adminData is not None):
        lines.extend(self.indent(self.writeAdminDataXML(elem.adminData), 1))
    if (self.version >= 4.0):
        lines.extend(self.indent(self._writeValueXMLV4(elem.value), 1))
    else:
        lines.extend(self.indent(self._writeValueXMLV3(elem.value), 1))
    lines.append('</CONSTANT-SPECIFICATION>')
    return lines