def addClosedXMLTag(attributes, depth, localName, output, text=''):
 depthStart = (' DCTB ' * depth)
 attributesString = getAttributesString(attributes)
 if (len(text) > 0):
  output.write(('%s<%s%s >%s</%s>\n' % (depthStart, localName, attributesString, text, localName)))
 else:
  output.write(('%s<%s%s />\n' % (depthStart, localName, attributesString)))

def addClosedXMLTag ( attributes , depth , localName , output , text = '' ) : depthStart = ( ' DCTB ' * depth ) attributesString = getAttributesString ( attributes ) if ( len ( text ) > 0 ) : output . write ( ( '%s<%s%s >%s</%s>\n' % ( depthStart , localName , attributesString , text , localName ) ) ) else : output . write ( ( '%s<%s%s />\n' % ( depthStart , localName , attributesString ) ) )
add the closed xml tag .