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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:10:40+00:00 2026-06-04T15:10:40+00:00

i have a problem here. I’ve ArrayList from the result of my parser class.

  • 0

i have a problem here.
I’ve ArrayList from the result of my parser class. then i wanna put that value (value from ArrayList) to TextView.

here is the work i’ve done till now.
I create TextView on my main.xml

<TextView
        android:id="@+id/deskripsi" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="@string/hello"
    />

and here at my onCreate Method, i initialized the Text View

desk = (TextView)findViewById(R.id.deskripsi);

and then i tried to parser the KML document from google map and at the Node Placemark i put its value to ArrayList, here my code

ArrayList<String> pathName = new ArrayList<String>();
Object[] objPlace;

//Parser Node Placemark
NodeList nlPlace = doc.getElementsByTagName("Placemark");
        for(int p = 0; p < nlPlace.getLength(); p++){
            Node rootPlace = nlPlace.item(p);
            NodeList itemPlace = rootPlace.getChildNodes();
            for(int y = 0; y < itemPlace.getLength(); y++){
                Node placeStringNode = itemPlace.item(y);
                NodeList place = placeStringNode.getChildNodes();
                //valueName = nameList.item(0).getNodeValue().toString() + "+";
                pathName.add(place.item(0).getNodeValue());
            }
    }

objPlace = pathName.toArray();

desk.setText("");
for (int j = 0; j < objPlace.length; j++){
    desk.append("Deskripsi:\n" + objPlace[j].toString() + "\n");
}

but when itried to run its to my emulator and real device, i get an error. here’s my LogCat
enter image description here

please help me, and sorry for my english >_<

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

    You can do this instead; use pathName directly in the for loop…

    desk.setText("");
    for (int j = 0; j < pathName.size(); j++){
        desk.append("Deskripsi:\n" + pathName.get(j) + "\n");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have a problem here. i wanna to test my parser result. i have
I have problem adding arraylist to list view, will explain about my problem here..
I have a problem here with this code. I'm opening a socket, then listening
I have a problem here that requires to design a data structure that takes
I have a litte problem here. I want to join twice from the same
I have a problem here - I have a hexadecimal value being stored in
I have some problem here. Here it is: I have this class public class
I have a problem here with cakePHP. I have 4 .ctp view pages that
I have a problem here that still cannot solve, the thing is I have
I have a problem here. I have about 13K rows of data that I

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.