scripts/export/rfam_xml_dumper.py
def xmllint(filepath):
    """
    Validate xml files against EBI Search schema.
    Run xmllint on the output file and print the resulting report.
    """
    schema_url = 'http://www.ebi.ac.uk/ebisearch/XML4dbDumps.xsd'
    cmd = ('xmllint {filepath} --schema {schema_url} --noout --stream') \
        .format(filepath=filepath, schema_url=schema_url)
    try:
        output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as e:
        print 'ERROR: xmllint validation failed'
        print e.output
        print e.cmd
        print 'Return code {0}'.format(e.returncode)
        sys.exit(1)

    Validate xml files against EBI Search schema.
    Run xmllint on the output file and print the resulting report.
    
Validate xml files against EBI Search schema.
Run xmllint on the output file and print the resulting report.
Validate xml files against EBI Search schema . Run xmllint on the output file and print the resulting report .
def xmllint(filepath):
    schema_url = 'http://www.ebi.ac.uk/ebisearch/XML4dbDumps.xsd'
    cmd = ('xmllint {filepath} --schema {schema_url} --noout --stream') \
        .format(filepath=filepath, schema_url=schema_url)
    try:
        output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as e:
        print 'ERROR: xmllint validation failed'
        print e.output
        print e.cmd
        print 'Return code {0}'.format(e.returncode)
        sys.exit(1)
def xmllint ( filepath ) : schema_url = 'http://www.ebi.ac.uk/ebisearch/XML4dbDumps.xsd' cmd = ( 'xmllint {filepath} --schema {schema_url} --noout --stream' ) . format ( filepath = filepath , schema_url = schema_url ) try : output = subprocess . check_output ( cmd , shell = True , stderr = subprocess . STDOUT ) except subprocess . CalledProcessError as e : print 'ERROR: xmllint validation failed' print e . output print e . cmd print 'Return code {0}' . format ( e . returncode ) sys . exit ( 1 )
Validate xml files against EBI Search schema.
Validate xml files against EBI Search schema .
"""
    Validate xml files against EBI Search schema.
    Run xmllint on the output file and print the resulting report.
    """
filepath