class cast exception on using xmlresouceparser with Document
<p>Hi all i have a class cast exception, No idea what is this, Can any one help on this</p>

<pre><code>XmlResourceParser fXmlFile = mn.getResources().getXml(R.layout.savecredentials);
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
            Document doc = docBuilder.parse((InputStream) fXmlFile); //exception is on //this line
</code></pre>
