def parseString(inString, silence=False):
    '''Parse a string, create the object tree, and export it.

    Arguments:
    - inString -- A string.  This XML fragment should not start
      with an XML declaration containing an encoding.
    - silence -- A boolean.  If False, export the object.
    Returns -- The root object in the tree.
    '''
    parser = None
    rootNode= parsexmlstring_(inString, parser)
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'PcGts'
        rootClass = PcGts
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2018-07-15"')
    return rootObj
def parseString ( inString , silence = False ) : parser = None rootNode = parsexmlstring_ ( inString , parser ) rootTag , rootClass = get_root_tag ( rootNode ) if rootClass is None : rootTag = 'PcGts' rootClass = PcGts rootObj = rootClass . factory ( ) rootObj . build ( rootNode ) if not silence : sys . stdout . write ( '<?xml version="1.0" ?>\n' ) rootObj . export ( sys . stdout , 0 , name_ = rootTag , namespacedef_ = 'xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2018-07-15"' ) return rootObj
Parse a string, create the object tree, and export it.

    Arguments:
    - inString -- A string.  This XML fragment should not start
      with an XML declaration containing an encoding.
    - silence -- A boolean.  If False, export the object.
    Returns -- The root object in the tree.