예제 #1
0
 def test_getSimpleModelsRelatedWithChEBI(self):
     res = self.s.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
예제 #2
0
 def easyXML(self, res):
     """Use this method to convert a XML document into an
         :class:`~bioservices.xmltools.easyXML` object
     The easyXML object provides utilities to ease access to the XML
     tag/attributes.
     Here is a simple example starting from the following XML
     .. doctest::
         >>> from bioservices import *
         >>> doc = "<xml> <id>1</id> <id>2</id> </xml>"
         >>> s = Service("name")
         >>> res = s.easyXML(doc)
         >>> res.findAll("id")
         [<id>1</id>, <id>2</id>]
     """
     from bioservices import xmltools
     return xmltools.easyXML(res)
예제 #3
0
    def easyXML(self, res):
        """Use this method to convert a XML document into an
            :class:`~bioservices.xmltools.easyXML` object

        The easyXML object provides utilities to ease access to the XML
        tag/attributes.

        Here is a simple example starting from the following XML

        .. doctest::

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

        """
        from bioservices import xmltools
        return xmltools.easyXML(res)
예제 #4
0
 def test_getSimpleModelsRelatedWithChEBI(self):
     res = self.s.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
예제 #5
0
def test_easyXML():
    res = easyXML(xmldata)
    res['parameter']
예제 #6
0
def test_easyXML():
    res = easyXML(xmldata)
    print res
    res['parameter']
예제 #7
0
def test_easyXML():
    res = easyXML(xmldata)
    res['parameter']
예제 #8
0
def test_easyXML():
    res = easyXML(xmldata)
    print res
    res['parameter']