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 6853265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:29:29+00:00 2026-05-27T01:29:29+00:00

I am having URL of PHP file from where i am getting all data

  • 0

I am having URL of PHP file from where i am getting all data in XML format.
Now i am able to read all those data using InputStream and passing to buffer.But the problem is i am not getting how can i separate all required data from the available data.I tried using DOM but it is giving me following error in my log

`Error in http connection java.net.MalformedURLException: Protocol not found in android

The code i am using is as follow.

try{
                HttpClient httpclient = new DefaultHttpClient();
                HttpPost httppost = new
                        HttpPost("http://www.mbusiness.com/mobile.php?id="+id.trim());
                HttpResponse response;
                response = httpclient.execute(httppost);
                HttpEntity entity = response.getEntity();
                InputStream is = entity.getContent();
                data = new byte[256];
                buffer = new StringBuffer();
                int len = 0;
                while (-1 != (len = is.read(data)) )
                  {
                     buffer.append(new String(data, 0, len));
                  }
                Log.e("log_tag",""+buffer.toString());

                 //Make the comparison case-insensitive.
                is.close();

DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        Document doc = dBuilder.parse(buffer.toString());
        doc.getDocumentElement().normalize();
        Log.e("Log.Tag",""+doc);

            }
            catch(Exception e){
                Log.e("log_tag", "Error in http connection "+e.toString());
                } 

My PHP file which i am reading is giving me following details

   <profile>
    <details user_login="chirag" 
user_nickname="chirag" 
user_email="dipendra@bcod.co.in" 
display_name="chirag" 
first_name="chirag singh" 
last_name="test singh" 
nickname="chirag singh" 
description="" 
twitter_id="" 
facebook_id="" 
paypal_email="" 
business_name="My Business Test" 
business_abn="testabn" 
business_contact="Chirag Test" 
business_phone="123456789" 
business_fax="123456" 
business_mobile="1456789" 
business_emailss="chirag@gmail.com" 
business_facebookzz="http://www.facebook.com" 
business_linkedin="http://www.linkedin.com" 
business_myspace="http://myspacelink.com" 
business_blog="Blog" 
business_im="im" 
business_website="tester" 
business_street="TestStreet" 
business_city="TestCity" 
business_postcode="123456" 
business_state="NSW New South Wales" 
business_trading="12345" 
business_area="500" 
business_trade="Saturday" 
business_products="TesterProducts" 
business_services="testerservices" 
business_delivery="only sunday" 
redirect_to=""/>
    </profile>
  • 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-05-27T01:29:30+00:00Added an answer on May 27, 2026 at 1:29 am

    There go your DOM parser: http://xjaphx.wordpress.com/2011/10/12/android-xml-adventure-%e2%80%93-parsing-xml-data-with-dom/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble getting the XML from a file using the simplexml_load_file function. I
Having no luck removing the index.php file from the url. For example I want
I'm having trouble bringing back data from my PHP file. I guess I don't
I'm having issues with getting data from an AJAX file, I am trying to
I am having some issues returning data from on page, using jQuery, PHP and
I've having issues with parsing JSON data from a php file through to JQuery.I've
I'm having problems using fopen in php. If I open the desired URL by
I'm writing a php script that will fetch data from a given URL and
i am having a url like http://localhost/joomla/Joomla_1.5.7/index.php?option=com_content&view=section&layout=blog&id=3&Itemid=55 and i want to redirect this to
I was having trouble sending up a url containing accent characters using IE. Here's

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.