|
From: <ja...@op...> - 2001-01-26 00:14:45
|
Hey, Yesterday Jiaye and I designed the framework for the XML API. This critical piece had been postponed in order to get something working quickly ==> xml2db.pl and db2xml.pl. Luckily Jiaye and I designed those two applications modularily with the intent of eventually moving all their code into a general XML API. Yesterday we tried out that concept for the first time. In good XP style, we first wrote some tests. Then we implemented Bio::Genex::Chromosome::db2xml() and Bio::Genex::Species::db2xml(), by pretty much just copying do_chromosome() and do_species() directly from db2xml.pl. These methods take a DB object and convert them into a XML::DOM node hierarchy (which can create XML by calling the toString() method). And it worked... Yahoo!!! The code is now in CVS on harwin. The plan is now for me to move enough of the db2xml.pl code into XMLUtils.pm so that DB updates are possible through GeneXML. This will be a huge improvement for all of us so that whenever we make updates to the core NCGR curated data, users will not have to install their DB from scratch (which is currently the case). This leaves the task of converting db2xml.pl over to the new API as it becomes ready. The next phase is to finish the API by design the inverse functions: xml2db (given a XML::DOM node, convert it into a DB object), and convert xml2db.pl to use the API. jas. |