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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:50:26+00:00 2026-05-24T08:50:26+00:00

How to Improve xml parsing in GWT ? My xml is as follows with

  • 0

How to Improve xml parsing in GWT ?

My xml is as follows with 1 record

To parse 100 Record GWT takes 8 sec

Is there any way to improve performance ? Plz see my gwt code to parse xml

< Record productid=”0″ productidext=”0″ productkeyid=”16000″ productversion=”1″ isFEDRecord=”false” validationstatus=”” selected=”false” accessmode=”modify” isedited=”false”>

< RecordAttribute name=”CINTEGERATTR” edited=”false”>

< Value>12345678< /Value>

< OldValue>12345678< /OldValue>

< /RecordAttribute>

< /Record>

My GWT parsing code is as follows:

private static List parseRecords(Document mainDOM,
List records) {
NodeList recordNodeList = mainDOM.getElementsByTagName(“Record”); //Record node
RecordInfo recordInfo= null;

    for(int i=0;i<recordNodeList.getLength();i++){ //iteration over record node

        recordInfo = new RecordInfo();
        recordInfo.setColumnCount(columnInfoList.size());
        recordInfo.setColumnInfoList(columnInfoList);
        HashMap<String, String> recordsColumnValueHashMap = new HashMap<String, String>();

        Element element = ((Element)recordNodeList.item(i));  //Record node


        NamedNodeMap recNodeMap = recordNodeList.item(i).getAttributes();
        if(i==0){

        }else{

            recordInfo.setProductid(recNodeMap.getNamedItem("productid").getNodeValue());
            recordInfo.setProductidext(recNodeMap.getNamedItem("productidext").getNodeValue());
            recordInfo.setProductkeyid(recNodeMap.getNamedItem("productkeyid").getNodeValue());
            recordInfo.setProductversion(Integer.parseInt(recNodeMap.getNamedItem("productversion").getNodeValue()));
            recordInfo.setFEDRecord(Boolean.parseBoolean(recNodeMap.getNamedItem("isFEDRecord").getNodeValue()));
            recordInfo.setValidationstatus(recNodeMap.getNamedItem("validationstatus").getNodeValue());
            recordInfo.setSelected(Boolean.parseBoolean(recNodeMap.getNamedItem("selected").getNodeValue()));
            recordInfo.setAccessmode(recNodeMap.getNamedItem("accessmode").getNodeValue());
            recordInfo.setIsedited(recNodeMap.getNamedItem("isedited").getNodeValue());
        NodeList recList = element.getElementsByTagName("RecordAttribute");


        for(int j=0;j<recList.getLength();j++){ //iterating all record attributes
            NodeList  child = recList.item(j).getChildNodes();

recordInfo.setColumnNameInRecord(recList.item(j).getAttributes().getNamedItem(“name”).getNodeValue());
recordInfo.setColumnInRecordEdited(Boolean.parseBoolean(recList.item(j).getAttributes().getNamedItem(“edited”).getNodeValue()));
for(int k=0;k

                if("Value".equalsIgnoreCase(child.item(k).getNodeName())){
                    if(child.item(k).getFirstChild()!=null){
                        String value = child.item(k).getFirstChild().getNodeValue();
                    //System.out.println("Value =  "+child.item(k).getFirstChild().getNodeValue());
                    recordInfo.setValue(value);
                    String columnName = recList.item(j).getAttributes().getNamedItem("name").getNodeValue();
                    recordsColumnValueHashMap.put(columnName, value);
                }
                }
                if("OldValue".equalsIgnoreCase(child.item(k).getNodeName())){
                    if(child.item(k).getFirstChild()!=null){
                        String oldValue = child.item(k).getFirstChild().getNodeValue();
                    //System.out.println("oldValue  ="+child.item(k).getFirstChild().getNodeValue());
                    recordInfo.setOldValue(oldValue);
                    }
                }
            }

        }
         recordInfo.setRecordHashMap(recordsColumnValueHashMap);
        }

        records.add(recordInfo);
    }
    return records;
}
  • 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-24T08:50:27+00:00Added an answer on May 24, 2026 at 8:50 am

    are your running in development mode or have you compilded it to actuall JavaScript code. In my experince development mode runds 10 times slower then when it is cross compiled to JavaScript. Still 8s is alot! Have you used Speedtrace to see where most of the time is lost?

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

Sidebar

Related Questions

In this question (http://stackoverflow.com/questions/1267474/itunes-xml-parsing-in-cocoa), Sreelal asks how to improve performance of loading/parsing a large
Is there any way to improve code completion in notepad++? Currently it supports some
I am trying to figure out a way to improve the performance of a
are there any improvements where i can improve this code? Maybe there are some
Does anybody have any tips/tricks as to how to improve performance in the following
Can someone help me improve on this? There has to be a better way.
To improve performance of our MVC3 application we want to mark some Controller's to
I'm trying to improve the performance of a website written in classic ASP. It
I am trying to implement a class representing an XML tree as follows: public
I am reading in an XML file and want to try and improve the

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.