code: public static XPathUtils newXPath(final URL url) {
          final DefaultHttpClient client = new DefaultHttpClientImpl();
          final GetMethod method = new GetMethod(url.toExternalForm());
          try {
              final int responseCode = client.executeMethod(method);
              if (responseCode != HttpStatus.SC_OK) {
                  LOG.warn("Unexpected response code: " + responseCode);
              } else {
                  final InputStream is = method.getResponseBodyAsStream();
                  return XPathUtils.newXPath(is);
              }
          } catch (final HttpException e) {
              LOG.warn("Could not handle XPath", e);
          } catch (final IOException e) {
              LOG.warn("Could not handle XPath", e);
          } catch (final SAXException e) {
              LOG.warn("Could not handle XPath", e);
          } finally {
              method.releaseConnection();
          }
          return null;
      }
docs: Creates a new {@link XPathUtils} instance from the data at the specified
  HTTP url.
  
  @param url The URL to load XML data from.
  @return An {@link XPathUtils} instance for the data at the given URL.