How to use the bioservices.xmltools.easyXML function in bioservices

To help you get started, we’ve selected a few bioservices examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cokelaer / bioservices / test / test_biomodels.py View on Github external
def _test_getSimpleModelsRelatedWithChEBI(biomodels):
    res = biomodels.getSimpleModelsRelatedWithChEBI()
    from bioservices import xmltools
    res = xmltools.easyXML(res.encode('utf-8'))
    modelIDs = set([x.findall('modelId')[0].text for x in res.getchildren()])
    assert len(modelIDs) > 1
github cokelaer / bioservices / test / test_xmltools.py View on Github external
def test_easyXML():
    res = easyXML(xmldata)
    res['parameter']
github cokelaer / bioservices / src / bioservices / services.py View on Github external
tag/attributes.

        Here is a simple example starting from the following XML

        .. doctest::

            >>> from bioservices import *
            >>> doc = " 1 2 "
            >>> s = Service("name")
            >>> res = s.easyXML(doc)
            >>> res.findAll("id")
            [1, 2]

        """
        from bioservices import xmltools
        return xmltools.easyXML(res)