This code doesn't make any sense.  Resources.getXml() returns an
XmlPullParser; you don't need to wrap that in another XML parser.  Just use
the returned XmlPullParser to read the XML directly.

On Tue, Feb 10, 2009 at 9:26 PM, cool.manish <mannishga...@gmail.com> wrote:

>
> What is the context?
> I am getting error at that point.
>
> Actually I am trying to parse the xml file
>
> SAXParser sp = spf.newSAXParser();
> sp.parse(context.getResources().getXml(R.xml.employees), this)
>
> On Feb 11, 3:32 am, Ludwig <ludwigbrinckm...@gmail.com> wrote:
> > sorry that should have been
> > context.getResources().getXml(R.xml.myxml)
> >
> > Ludwig
> >
> > 2009/2/10 Ludwig <ludwigbrinckm...@gmail.com>
> >
> >
> >
> > > put it under res/xml/myfile.xml (in Eclipse you will have to create
> that
> > > directory). You can then load the file as
> context.getResources(R.xml.myfile)
> > > HTH
> > > Ludwig
> >
> > > 2009/2/10 cool.manish <mannishga...@gmail.com>
> >
> > >> Hi, I am trying to make a simple application to parse the XML using
> > >> SAXParser but it is not finding the xml file which I have added in the
> > >> project. How and where should I add the XML file?- Hide quoted text -
> >
> > - Show quoted text -
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~
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