Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by thibou

Hi,

Ejecta doesn't support (?) responseXml in ajaxRequest. It only contains response and responseText. What is the best way to parse and access responseText's data by tag name etc. when using Ejecta?

1 decade ago by dominic

Browsers provide XML access through the DOM - which Ejecta doesn't have. There's no XML parser (or HTML parser for that matter) in Ejecta.

You can either try to parse the XML string directly in JavaScript ( this library looks reasonable, but seems to require some node.js modules) or do the XML parsing in native Obj-C code (convert it directly into a plain JSON object, maybe) with a native XML parsing lib.

My advice however would be to just switch the server output to JSON. If you have access to the server implementation this would likely be the easiest solution.
Page 1 of 1
« first « previous next › last »