title: Parsing InputStream from URL with parameters
body: <p>I'm trying to parse next url:
  <a href="http://kavim-t.co.il/include/getXMLStations.asp?parent=55_%20_2" rel="nofollow">http://kavim-t.co.il/include/getXMLStations.asp?parent=55_%20_2</a></p>
  
  <p>Code:</p>
  
  <pre><code>//using jdom SAX parser
  SAXBuilder builder = new SAXBuilder();
  URL url = new URL("http://kavim-t.co.il/include/getXMLStations.asp?parent=55_%20_2");
  InputStream in = getInputStrem(url);
  Document document = builder.build(in); ...
  </code></pre>
  
  <p>getInputStream():</p>
  
  <pre><code>public static InputStream getInputStrem(URL url) {
      InputStream in = null;
      try {
          HttpURLConnection con = (HttpURLConnection) url.openConnection();
          con.setRequestMethod("GET");
          con.connect();
          in = con.getInputStream();
  
      } catch (IOException e) {
          e.printStackTrace();
      }
      return in;
  }
  </code></pre>
  
  <p>Exception "Error on line 3: At line 3, column 29: not well-formed (invalid token)"</p>
  
  <p>is getting when trying to run next line:</p>
  
  <pre><code>Document document = builder.build(in)  
  </code></pre>
  
  <p>I think the problem is in the getInputStream() function,</p>
  
  <p>because if I replace Url to simpler one (with no parameters and classic structure) , it's working fine. </p>