def addBeginEndInnerXMLTag(attributeDictionary, className, depth, innerText, output, text=''):
 if (len(innerText) > 0):
  addBeginXMLTag(attributeDictionary, className, depth, output, text)
  output.write(innerText)
  addEndXMLTag(className, depth, output)
 else:
  addClosedXMLTag(attributeDictionary, className, depth, output, text)

def addBeginEndInnerXMLTag ( attributeDictionary , className , depth , innerText , output , text = '' ) : if ( len ( innerText ) > 0 ) : addBeginXMLTag ( attributeDictionary , className , depth , output , text ) output . write ( innerText ) addEndXMLTag ( className , depth , output ) else : addClosedXMLTag ( attributeDictionary , className , depth , output , text )
add the begin and end xml tag and the inner text if any .