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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:10:48+00:00 2026-06-08T15:10:48+00:00

I am making an application for Android and I need to display an XML

  • 0

I am making an application for Android and I need to display an XML file of this page: In the application show Compra="481.3" Venta="485" but i cant "DOLAR SPOT INTERBANCARIO" and Var_por="-0,53" Var_pes="-2,60" hora="10:35". Help me with the code please.

XML image XML

This is ExampleHandler code

public class ExampleHandler extends DefaultHandler {

private boolean in_Root = false;
private boolean in_Registro = false;

private ParsedExampleDataSet myParsedExampleDataSet = new ParsedExampleDataSet();

public ParsedExampleDataSet getParsedData() {
    return this.myParsedExampleDataSet;
}


@Override
public void startDocument() throws SAXException {
    this.myParsedExampleDataSet = new ParsedExampleDataSet();
}

@Override
public void endDocument() throws SAXException {
}


@Override
public void startElement(String namespaceURI, String localName,
        String qName, Attributes atts) throws SAXException {
    if (localName.equals("Root")) {
        this.in_Root = true;
    }else if (localName.equals("Registro")) {
        this.in_Registro = true;
        // Extract an Attribute
        String attrValue = atts.getValue("Compra");
        Float compra = Float.parseFloat(attrValue);
        myParsedExampleDataSet.setExtractedCompra(compra);

        String attrValue2 = atts.getValue("Venta");
        Float venta = Float.parseFloat(attrValue2);
        myParsedExampleDataSet.setExtractedVenta(venta);

        **String attrValue3 = atts.getValue("Var_por");
        Float por = Float.parseFloat(attrValue3);
        myParsedExampleDataSet.setExtractedPor(por);**
        //its my wrong code for  Var_por    
    }
}

@Override
public void endElement(String namespaceURI, String localName, String qName)
        throws SAXException {
    if (localName.equals("Root")) {
        this.in_Root = false;
    }else if (localName.equals("Registro")) {

    }
}

/** Gets be called on the following structure: 
 * <tag>characters</tag> */
@Override
public void characters(char ch[], int start, int length) {
    if(this.in_Registro){
        //myParsedExampleDataSet.setExtractedStruct(new String(ch, start, length));
    }
}

}

  • 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-08T15:10:56+00:00Added an answer on June 8, 2026 at 3:10 pm

    You might check out SimpleXML for something small like that. It works well on Android.

    SimpleXML parser

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

Sidebar

Related Questions

I am making an application for Android and I need to display an XML
I am making an android application to show the position of a user on
I am making an android application that will play an mp3 file once a
I am making an android application that needs to display all of the items
I'm making an Android application where I need to slow down the audio being
I am making one project where i need to display Home page and when
I am making an application for android, i need to make a request to
I am making an android application and as a part of that I need
I am currently making an android application which need to present a lot of
I'm making a Android application, where I need to read the latest news from

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.