Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Parsing the BioPortal web service response

Pradnya Gawade pgawade at
Fri Jan 20 06:23:52 PST 2012



I am planning to integrate my web application with BioPortal by using
REST web services API and would like to know more about how people parse
the web service response from BioPortal.

Some where I found the sample code to parse these xmls using DOM parser
which I am using right now and it works for simple cases but I think it
is not reliable because it is difficult to handle nested elements and
things like this with this way where you fetch the elements using
methods like getElementsByTagName(String ..).

Some sample code is here:


DocumentBuilderFactory docBuilderFactory =

DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();

Document doc = docBuilder.parse(uri);                 


NodeList listClassBean1 = doc.getElementsByTagName("classBean");



 I am not able to specify the level of elements in the hierarchy I want
to go up to as in the BioPortal web service response, "classBean" is at
multiple levels. I am thinking there might be better ways to do this may
be using APIs like castor or some how making use of schema files.
However BioPortal say they do not provide schema files. Could any body
please provide any suggests as to how they are doing it? Presently I am
planning to take a look at castor to see how I can use it with BioPortal
web services. 

I will really appreciate the quick response from some body.


- Pradnya

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list