We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to process xml data from server using DataManager and bound to Grid


How to process the XML response from server and bound the result to Grid?


Essential Javascript DataManager works well with JSON data, but when comes with xml, we need custom adaptor to achieve this requirement. In the custom adaptor, the processResponse has to be overridden to process the xml response from the server.

In the below code snippet, we have extended processResponse method of the ej.UrlAdaptor and in the extended method, the xml data from the server is converted into JSON array. Now it can bound with grid. In the following code, we have performed simple Xml to Json conversion in the function “ConvertToJSON”, which will parse the simple xml document to json, for complex xml parsing, you can use external libraries.



Now let us see, how to use the above custom adaptor (named xmlAdaptor) in the grid. Render the grid and assign the custom adaptor to the grid datasource in the grid Load event.

Grid Initialization










Angular 2 with MVC backend




Asp.Net core:



Figure 1. Response from the server as XML


Figure 2. Grid with data from XML source

Article ID: Published Date: Last Revised Date: Platform: Control:
3375 01/23/2015 07/11/2018 ASP.NET MVC DataManager
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon