Invalid JSON data for parsing

TreeTable, configurable via XML, and receives data in XML format.

TreeTable → Property “save” has page name defined, means that when value of editable control changes, the TreeTable submits POST request on “save” page to save the changes.

Problem: on server side the POST request processor returns data in XML format.
The data looks like this:

<messages><errors><error Category='Preprocessing' Name= 'Control Validation' IsModal='False' ><![CDATA[Unexpected or empty FormAction parameter.]]></error><error Category='Preprocessing' Name= 'Control Validation' IsModal='False' ><![CDATA[Unexpected or empty PageElementID parameter.]]></error></errors></messages>

But Client-side expects JSON, cannot handle XML and generates an error “Invalid JSON data for parsing” when above mentioned XML is returned.

I’d like to be able to parse XML response.
Question: how to define on client-side a custom Response handler for Save requests?

Thanks,
Vasiliy

You need to define a custom proxy

http://docs.webix.com/desktop__server_proxy.html

Check for example connector proxy, which works with XML

https://github.com/webix-hub/tracker/blob/master/codebase/webix_debug.js#L2166

it defines the result handler which converts XML response to JSON state object.

Thank you for reply.

Tried to write Proxy. To many unknowns.
Is there a way to outsource Proxy for XML?
For specific tasks, like writing proxy , I’d rather use professionally written code, learn and customize it.

Hello, you may send your request to this emal: sales@xbsoftware.com. Our team of professional developers will assist you in implementing the above mentioned task.