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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:09:27+00:00 2026-05-27T18:09:27+00:00

Hi I have one xml file successfully parsed my before. now i am change

  • 0

Hi I have one xml file successfully parsed my before. now i am change simple modification in my xml file after i am getting lot of error. how to solve this error i don’t know i post my my xml file 1st and am using sax parser.

i have two spinner if i click 1st spinner its shows test1, test2, test3 then i select test1 its shows test1 sub tag name stest1 to stest5. if select test2 my 2nd spinner show stest6 to stest10 this is my working xml file output now i am trying to add one tag in sltag from my xml file already my sltag display name tag now i am add here my problem is started. my problem is how to get both values into my sltag i need separate string value so i passed class in my sltag array list and create class also after declare name and path into array list then how to get both string value My purpose is when i select 2nd spinner value that i want to show some images in same screen bottom i trying to get path string value.

This is my error:
1. error line: Type mismatch: cannot convert from ArrayList to ArrayList

line

source link: http://paste.org/42566

other java files link here:

http://paste.org/42567

http://paste.org/42568

http://paste.org/42569

  • 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-27T18:09:27+00:00Added an answer on May 27, 2026 at 6:09 pm

    Your method getSLTag is declared to return an ArrayList<String> but the variable sltag in the xmlTag class is actually an ArrayList<SubChild> hence the type mismatch.

    So to answer your additional comment about wanting to get path string from sltag, you will need to iterate over the collection of SubChilds and add each path to a new List of Strings, e.g.

    public ArrayList<String> getSLTag(String hltag) {
        List<String> slTags = new ArrayList<String>();
        for(int i = 0; i < xmlTagInfo.size(); i++) {
            if( xmlTagInfo.get(i).hltag == hltag ) {
                for (SubChild child : xmlTagInfo.get(i).sltag) {
                    // Your SubChild class actually declares path and name to be an ArrayList of Strings, but surely they should just be Strings?
                    slTags.add(child.getPath());
                }
            }
        }
        return slTags;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one .net windows application I'm trying to read .xml file from c#
I have one problem , I want to get some data from XML file
I have an XML file which has many section like the one below: <Operations>
i have an xml file sitemap.xml as shown below ..i need to add one
I have generated an XML file that and one of the nodes contains data
I have a sample xml file which looks like the one below: <Root> <SubOne>
I have an XML file that I'm trying to parse with Linq-to-XML. One of
I have a php file setup to pull through ONE XML data feed, What
I am new to MVC and facing one issue. I have a xml file
I have One XML file which will be look like this :: <Note> <NoteId>13328</NoteId>

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.