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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:43:41+00:00 2026-06-01T05:43:41+00:00

I am storing xml data in a string into user preferences. I want to

  • 0

I am storing xml data in a string into user preferences. I want to create hashmap from this xml string. please help me; here is my xml string;

    String data = " <modules> <Calls> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Calls> <Cases> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Cases> <CFM_CoBuyer> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </CFM_CoBuyer> <Contacts> <access>89</access> <delete>-99</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Contacts> <Inv_Inventory> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Inv_Inventory> <Meetings> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Meetings> <Notes> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Notes> <Opportunities> <access>89</access> <delete>-99</delete> <edit>90</edit> <export>-99</export> <import>-99</import> <list>80</list> <view>90</view> </Opportunities> <Tasks> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Tasks> <Trd_TradeIns> <access>89</access> <delete>90</delete> <edit>90</edit> <export>90</export> <import>90</import> <list>90</list> <view>90</view> </Trd_TradeIns> </modules> ";

I want to retrieve modules from “modules” tag in an array, and the array must contain sub tags for each module. Please suggest some solution.

  • 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-01T05:43:42+00:00Added an answer on June 1, 2026 at 5:43 am

    you can do using node List

    Document document = null;
    NodeList nodeList = null;
    Node node = null;
    
    nodeList = document.getElementsByTagName("modules").item(0).getChildNodes();
    HashMap <String,Object> localParameterMap  = new HashMap<String,Object>();
    
    for(int i=0; i<nodeList.getLength(); i++){
        node = nodeList.item(i);
        if(node.getNodeName().equals("Calls")){
            Collection objCollection = readAttributeList(node);
            localParameterMap.put(ATTRIBUTE_LIST, objCollection);
        }
    }
    

    How to update XML Dynamically

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

Sidebar

Related Questions

I have a query that strips data from a XML string, inserts it into
I'm using System.Xml in order to get data from xml data: string test =
i have used libxml2.Here when i am getting an XML data as a string
I ran into a problem while trying to parse an XML string returned from
In which cases storing data as XML is preferable to RDBMS and why? Can
I am writing a program using Delphi 2006 and storing data in XML files
<xml> <data> <Attribute name='forms'> <List> <String>xform</String> <String>yform</String> </List> </Attribute> </data> </xml> How would I
The XML String I am getting from other application is converting & to &amp;
given an xml string like this: <some><nested><xml>value</xml></nested></some> what's the best option (using ruby) to
Many of us have been indoctrinated in using XML for storing data. It's benefits

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.