title: Passing a http url into SAXParser XML
body: <p>I'm having a problem passing an XML page into the SAXParser as a variable.  My code below obtains a URL and tries to pass it into the SAXParser, but I get an error.  </p>
  
  <p>However, when I explicitly define the URL (rather than use the variable), if works fine.  Does anyone no why this is failing.  </p>
  
  <p>Thanks to anyone who may be able to help.  I've trimmed the code for viewing purposes.</p>
  
  <pre><code>public class Parser extends DefaultHandler
    private String link;
  
      public void parseDocument() {
  
          SAXParserFactory spf = SAXParserFactory.newInstance();
          try {
  
              SAXParser sp = spf.newSAXParser();
  
              link = coll.getGcollId(id);  // this successfully gets a string (url) to link to xml page over http string          
              //parse the file and also register this class for call backs
              sp.parse(link, this);  // when I run this code this line gets a "java.io.FileNotFoundException: http://foo.com/foo.xml"
  </code></pre>