InputStream obj_is = null;
Document obj_doc = null;
DocumentBuilderFactory doc_build_fact = null;
DocumentBuilder doc_builder = null;
obj_is = new FileInputStream("/sdcard/xmlfile.xml");
doc_build_fact = DocumentBuilderFactory.newInstance();
doc_builder = doc_build_fact.newDocumentBuilder();

obj_doc = doc_builder.parse(obj_is);

 NodeList obj_nod_list = null;
  if(null != obj_doc)
    {
org.w3c.dom.Element feed =  obj_doc.getDocumentElement();
obj_nod_list = feed.getElementsByTagName("tag name u want to parse");
    }


to get the no of elements founded :  obj_nod_list.getLength();


On Fri, Jan 8, 2010 at 12:56 PM, ROHIT <rohit...@gmail.com> wrote:

> I want to access the XML file from sdcard and i want to parse thar
> file. How ta access this file and pass it to Parse method?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thank you
Dilli Rao
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to