Question

We are using JQuery and JQuery UI and looking to rewrite a xml to dom table into a datastore based grid. In ExtJs, I can use Ext.data.reader.Xml along with a data Modal to map the returned data to the grid. I am trying to do the same, but using a JQuery based grid library. Performance and theming also need to be considered.

I have used JqGrid in the past, it has the xmlmap option. But, I am looking at SlickGrid, specially for its performance capabilities. I could not see any XML driven examples. I suspect if I go with Slickgrid I will have to load the xml and loop through it to build the the data object.

Do anyone have suggestions for using Slickgrid to show XML data. Specifically, does it have xmlmap or xml reader features? Would SlickGrid give significant performance improvement over JqGrid for say 1000 rows?

Example of XML:

            <D:prop>
            <FileExtension>.s4d</FileExtension>
            <ComponentType>DynamicTrove</ComponentType>
            <getcontenttype>application/xml</getcontenttype>
            <ComponentCreatedOn>2011-03-17 12:57:57 </ComponentCreatedOn>
            </D:prop>
            <D:prop>
            <FileExtension>.s4d2</FileExtension>
            <ComponentType>DynamicTrove2</ComponentType>
            <getcontenttype>application/xml2</getcontenttype>
            <ComponentCreatedOn>2011-03-17 12:57:57 2</ComponentCreatedOn>
            </D:prop>

Thank you.

Example of

Was it helpful?

Solution

You can display such XML data in a grid. I recommend you to include local searching and filtering which could be very practical for the user if the user have to analyse 1000 rows of data. If you would use paging with filtering you will get very good performance for 1000 rows. I don't recommend you to display all 1000 rows at once. Paging is much better.

The main problem could be XML namespaces because it could be parsed in different ways with respect of jQuery. See the answer for short description of the problem.

The demo is an example which can be your starting point. Another demo uses XML namespaces and work correct in IE, but it works incorrect in Google Chrome.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top