[jdom-interest] Error with JDom?

Nicky_Eshkenazi at hmco.com Nicky_Eshkenazi at hmco.com
Fri Mar 23 08:29:51 PST 2001


I just gave it a try with the following simple piece of code:

import java.net.*;
import java.io.*;
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;

public class Read {
     public static void main (String args[]) throws MalformedURLException,
IOException, JDOMException {
          XMLOutputter out = new XMLOutputter("  ", true);
          SAXBuilder builder = new SAXBuilder();
          Document doc = builder.build(new URL("http://cnn.com/cnn.rss"));
          out.output(doc, System.out);

works like a champion,

probably you should take a look at your proxy stuff.


                    Chad LaJoie                                                                                         
                    <clajoie at vt.edu>          To:     jdom-interest at jdom.org                                            
                    Sent by:                  cc:                                                                       
                    jdom-interest-admi        Subject:     RE: [jdom-interest] Error with JDom?                         
                    n at jdom.org                                                                                          
                    03/23/2001 09:13                                                                                    

Kevin, Phillip
         I tired that when it was suggested that this might be the same
problem as the "parser hangs" problem in the FAQ.  It didn't help.  Any
other suggestions?

At 12:45 PM 3/23/2001, you wrote:
>I think Jason pointed out the root of your problem, try wrapping the URL
>a buffer and then building, like so:
>in = new BufferedReader( new InputStreamReader(
>urlConn.getInputStream() ) );
> > -----Original Message-----
> > From: jdom-interest-admin at jdom.org
> > [mailto:jdom-interest-admin at jdom.org]On Behalf Of Chad LaJoie
> > Sent: Friday, March 23, 2001 3:48 AM
> > To: jdom-interest at jdom.org
> > Subject: RE: [jdom-interest] Error with JDom?
> >
> >
> > I've tried to use the SAX parser and came up with the same error.
> >  The XML
> > file that I am trying to parse is the one I included before,
> > http://cnn.com/cnn.rss.
> >
> > At 10:25 PM 3/22/2001, you wrote:
> > >I would try to use SAXBuilder and see of the same problem
> > persists.  Second,
> > >give use the URL and sample data and maybe we can make more sense of
> > >
> > >To control your jdom-interest membership:
> > >http://lists.denveronline.net/mailman/options/jdom-interest/youra
>ddr at yourhost.com
> >
>Chad La Joie                           "Only a man who can not conquer
>IT Specialist                             his deficiencies feels the need
>IS&C - WARD                             convince the world he has none"
>To control your jdom-interest membership:

>To control your jdom-interest membership:


Chad La Joie                           "Only a man who can not conquer
IT Specialist                             his deficiencies feels the need
IS&C - WARD                             convince the world he has none"

To control your jdom-interest membership:

More information about the jdom-interest mailing list