def addXMLLine(line, xmlLines):
 strippedLine = line.strip()
 if (strippedLine[:len('<!--')] == '<!--'):
  endIndex = line.find('-->')
  if (endIndex != (-1)):
   endIndex += len('-->')
   commentLine = line[:endIndex]
   remainderLine = line[endIndex:].strip()
   if (len(remainderLine) > 0):
    xmlLines.append(commentLine)
    xmlLines.append(remainderLine)
    return
 xmlLines.append(line)

def addXMLLine ( line , xmlLines ) : strippedLine = line . strip ( ) if ( strippedLine [ : len ( '<!--' ) ] == '<!--' ) : endIndex = line . find ( '-->' ) if ( endIndex != ( - 1 ) ) : endIndex += len ( '-->' ) commentLine = line [ : endIndex ] remainderLine = line [ endIndex : ] . strip ( ) if ( len ( remainderLine ) > 0 ) : xmlLines . append ( commentLine ) xmlLines . append ( remainderLine ) return xmlLines . append ( line )
get the all the xml lines of a text .