[MOBY-l] java xml parsing

Benjamin Good bmg at sfu.ca
Tue May 25 10:55:46 UTC 2004


Say I have a Query response like this

"<?xml version='1.0' encoding='UTF-8'?>"+
        "<moby:MOBY xmlns:moby='http://www.biomoby.org/moby' 
xmlns='http://www.biomoby.org/moby'>"+
        "<moby:mobyContent 
moby:authority='illuminae.com'><moby:serviceNotes>This is provided by 
SeqHound</moby:serviceNotes>"+
                "<moby:mobyData moby:queryID='1'>"+
                    "<moby:Simple moby:articleName=''>" +
                    "<genbank-flatfile namespace='NCBI_gi' 
id='111076'><![CDATA[LOCUS D31461 32 aa linear   ROD 30-MAY-1997"+
        "DEFINITION  T-cell receptor delta chain BDN7, thymus - mouse 
(fragment)."+
        "ACCESSION   D31461"+
        "PID         g111076"+
        "ORIGIN"+
         "       1 atyfcalmer vsrrgapdkl vfgqgtqvtv ep"+
        "//]]></genbank-flatfile></moby:Simple>"+
                "</moby:mobyData>"+
                "</moby:mobyContent></moby:MOBY>";       

Any suggestions regarding the best way to extract the gi id or the CDATA 
?  It seems there are many options, just wondering if the Java group has 
already settled on an approach.

thanks
-Ben




More information about the moby-l mailing list