I am trying to parse an xml file on my desktop. I am getting an error
<p>Parse code is :</p>

<pre><code>private UrlList parseUrl(URL url) {
    URL SourceUrl = null;
    SourceUrl = url;

    try {
        /** Handling XML */
        SAXParserFactory spf = SAXParserFactory.newInstance();
        SAXParser sp = spf.newSAXParser();
        XMLReader xr = sp.getXMLReader();
        /** Create handler to handle XML Tags ( extends DefaultHandler ) */
        XMLParser myXmlParser = new XMLParser();
        xr.setContentHandler(myXmlParser);
        xr.parse(new InputSource(SourceUrl.openStream()));

    } catch (IOException e) {
        e.printStackTrace();
    } catch (Exception e) {
        System.out.println(" XMLParsing error is : " + e);
    }

    urlList = XMLParser.urlList;
    return urlList;
}// end of parseurl
</code></pre>

<p>The url that iam giving is<br>
sourceUrl = new URL("file://C:/Users/raghu/Desktop/aero/products.xml");
similarly , i have the resources path also in the same manner </p>

<pre><code>file://C:/Users/raghu/Desktop/aero/"resource sub folders"
</code></pre>

<p>I am getting the following error</p>

<pre><code>     D/dalvikvm(  118): GC_EXPLICIT freed 80K, 52% free 2864K/5895K, external 2155K/2537K, paused 82ms
W/System.err( 1078): java.io.IOException: Unable to connect to server: null
W/System.err( 1078):    at org.apache.harmony.luni.internal.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:203)
W/System.err( 1078):    at org.apache.harmony.luni.internal.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:300)
W/System.err( 1078):    at java.net.URL.openStream(URL.java:645)
W/System.err( 1078):    at com.omkarsoft.ImagePortofolio.ImagePortofolio.parseUrl(ImagePortofolio.java:178)
W/System.err( 1078):    at com.omkarsoft.ImagePortofolio.ImagePortofolio.onCreate(ImagePortofolio.java:76)
W/System.err( 1078):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
W/System.err( 1078):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
W/System.err( 1078):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
W/System.err( 1078):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
W/System.err( 1078):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
W/System.err( 1078):    at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 1078):    at android.os.Looper.loop(Looper.java:123)
W/System.err( 1078):    at android.app.ActivityThread.main(ActivityThread.java:3683)
W/System.err( 1078):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1078):    at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err( 1078):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/System.err( 1078):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
</code></pre>
