[jdom-interest] SAXBuilder.build(URL) connects twice?

Jason Hunter jhunter at acm.org
Fri Jan 25 16:42:33 PST 2002


I tried it right now w/ the latest code in CVS and I see just one
record.  You still having the issue?

-jh-

Mike Hogarth wrote:
> 
> I have the following code in a program:
> 
>         SAXBuilder builder = new SAXBuilder(false);
>         Document doc = builder.build(host.toString());
>         XMLOutputter xml_out = new XMLOutputter();
>         System.out.println(xml_out.outputString(doc));
> //get the raw text.
> 
> The host.toString() =
> http://www.ncbi.nlm.nih.gov/entrez/utils/pmfetch.fcgi?db=Pub
> Med&id=11794619&report=xml&mode=text
> If you click that link with Internet Explorer, you get a
> single XML document...
> 
> I also used a socket reading program and the results are
> attached as raw_socket_data.xml --- verifying that it
> returns one document.
> 
> Yet, what is printed in the through the XMLOutputter is two
> instances of <PubMedArticle> entries, each the same as the
> other.
> 
> I can't figure out why I am getting two XML records with
> JDOM connections when doing it with a browser or other
> software results in a single XML document.
> 
> Help... It is totally screwing up a piece of software that
> expects a single record.
> 
> --Mike H
> 
>   ------------------------------------------------------------------------
>                   Name: pubmed2.xml
>    pubmed2.xml    Type: XML Document (text/xml)
>               Encoding: base64
> 
>                           Name: raw_socket_data.xml
>    raw_socket_data.xml    Type: XML Document (text/xml)
>                       Encoding: base64



More information about the jdom-interest mailing list