parse an XML external entity out of context and build a
      tree.  [78] extParsedEnt ::= TextDecl? content  This
       correspond to a "Well Balanced" chunk

def parseEntity(filename):
    """parse an XML external entity out of context and build a
      tree.  [78] extParsedEnt ::= TextDecl? content  This
       correspond to a "Well Balanced" chunk """
    ret = libxml2mod.xmlParseEntity(filename)
    if ret is None:raise parserError('xmlParseEntity() failed')
    return xmlDoc(_obj=ret)