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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:11:18+00:00 2026-05-23T13:11:18+00:00

I have a link from that link: http://api.maxxiscentral.com/maxxiscentral/GetTyrePatterns from this link i want to

  • 0

I have a link from that link:

http://api.maxxiscentral.com/maxxiscentral/GetTyrePatterns

from this link i want to catch the data as string and from that string i want to create its xml file.

    package com.androidpeople.xml.parsing;

import java.net.URL;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;

public class XMLParsingExample extends Activity {

    /** Create Object For SiteList Class */
    SitesList sitesList = null;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        /** Create a new layout to display the view */
        LinearLayout layout = new LinearLayout(this);
        layout.setOrientation(1);

        /** Create a new textview array to display the results */
        TextView name[];
        TextView website[];
        TextView category[];

        try {

            /** Handling XML */
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp = spf.newSAXParser();
            XMLReader xr = sp.getXMLReader();

            /** Send URL to parse XML Tags */
            URL sourceUrl = new URL(
                    "http://api.maxxiscentral.com/maxxiscentral/GetTyrePatterns");

            /** Create handler to handle XML Tags ( extends DefaultHandler ) */
            MyXMLHandler myXMLHandler = new MyXMLHandler();
            xr.setContentHandler(myXMLHandler);
            xr.parse(new InputSource(sourceUrl.openStream()));

        } catch (Exception e) {
            System.out.println("XML Pasing Excpetion = " + e);
        }

        /** Get result from MyXMLHandler SitlesList Object */
        sitesList = MyXMLHandler.sitesList;

        /** Assign textview array lenght by arraylist size */
        name = new TextView[sitesList.getName().size()];
        website = new TextView[sitesList.getName().size()];
        category = new TextView[sitesList.getName().size()];

        /** Set the result text in textview and add it to layout */
        for (int i = 0; i < sitesList.getName().size(); i++) {
            name[i] = new TextView(this);
            name[i].setText("Name = "+sitesList.getName().get(i));
            website[i] = new TextView(this);
            website[i].setText("Website = "+sitesList.getWebsite().get(i));
            category[i] = new TextView(this);
            category[i].setText("Website Category = "+sitesList.getCategory().get(i));

            layout.addView(name[i]);
            layout.addView(website[i]);
            layout.addView(category[i]);
        }


        /** Set the layout view to display */
        setContentView(layout);

    }
}

i have this code to convert string into xml but,

this code run in java but not in android. why?

and how can i get the data as from that link.

thanks in advanced.

  • 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-23T13:11:18+00:00Added an answer on May 23, 2026 at 1:11 pm

    get from here
    get it
    get it
    get it
    get it

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

Sidebar

Related Questions

I have following link, returning XML as from following link http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=24.827774,67.034367 //This is URLString
i have a working example which uses this url http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=jQuery16201154390876987067_1314382298849&tags=cat&tagmode=any&format=json&_=1314382298856 which gives me this
I have a custom feature, and I'd like to link to that functionality from
I have a link that I dynamically create which looks something like the following:
I have a string, which my app reads from a remote API source (Facebook
When viewing this url http://dl.dropbox.com/u/1550420/jquery/flickr.html , we see a list of images pulling from
Following on from my previous question [link text][1] , I have a new problem.
I was reading Java Platform Performance (sadly the link seems to have disappeared from
I have seen this link: Implementing Mutual Exclusion in JavaScript . On the other
Anyone have a link to what the C++ standard says regarding a compiler removing

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.