Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8434677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:43:22+00:00 2026-06-10T06:43:22+00:00

I have implemented XML Pull Parser for local XML file stored in xml folder.

  • 0

I have implemented XML Pull Parser for local XML file stored in xml folder. I need to implement the same for XML in some destinated URL, how to pass URL to XML Pull parser ?

i tried like this below code i am getting error.

parser.setInput(new InputStreamReader(getUrlData(url))); 

the xml file looking like this

<?xml version="1.0" encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
   <list name="friends">
     <entry uri="sip:bob@example.com">
        <display-name>subbu</display-name>
     </entry>
     <entry uri="sip:maa@example.com">
        <display-name>raja</display-name>
     </entry>
  </list>
</resource-lists>

how to read this information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:43:24+00:00Added an answer on June 10, 2026 at 6:43 am

    In xmlpullparser have this method to get data from URL call this function like this

    XmlPullParserFactory factory = XmlPullParserFactory.newInstance();       
    factory.setNamespaceAware(true);
    XmlPullParser parser = factory.newPullParser();
    parser.setInput(new InputStreamReader(getUrlData("url as string")));
    

    function for getting data from url.

    public InputStream getUrlData(String url) throws URISyntaxException, 
                                              ClientProtocolException, IOException {
    
        DefaultHttpClient client = new DefaultHttpClient();
        HttpGet method = new HttpGet(new URI(url));
        HttpResponse res = client.execute(method);
        return res.getEntity().getContent();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented an application for modify the xml layout with some properties. I
I have some 5 XML calls to be implemented in C#. I used Xsd2Code
I have implemented a csv file builder that takes in an xml document applies
We have implemented webservice which generates xml response. I am facing issue while invoking
I have implemented a custom view within another activity into a XML layout. The
I have been assigned to implement an interface to an API that uses XML
i have implemented galleryview in one screen named display_image.xml in which i have shown
I have implemented some utility classes in Flex that I want to use in
The problem again is that though i have succesfully implemented a SAX parser in
I have implemented the change mentioned in the accepted answer of Generating an Xml

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.