Page 1 of 1

HTML 5 and XML Parsing externals

Posted: Wed Jan 06, 2016 10:50 pm
by klvs2001
I am in the middle of creating an app which uses revxml commands to parse XML returning from a Web Service.

Does anyone on the forum have experience with this combination?

The "regular" build works fine for Windows...since I can include the XML externals.

So any information would be useful.

Thank you.

Thomas

Re: HTML 5 and XML Parsing externals

Posted: Wed Jan 06, 2016 11:03 pm
by peter-b
The HTML5 engine doesn't support externals (and is unlikely ever to do so!)

However, in a future release I hope to make it possible to put JavaScript code in a LiveCode Builder extension, which would let me achieve the same sort of things that an external can.

Re: HTML 5 and XML Parsing externals

Posted: Wed Jan 06, 2016 11:38 pm
by [-hh]
peter-b wrote:However, in a future release I hope to make it possible to put JavaScript code in a LiveCode Builder extension, which would let me achieve the same sort of things that an external can.
Peter, that would be great, even better than the 'unsupported' branch. One could use by that the whole wide world of (good) js-libraries.

Re: HTML 5 and XML Parsing externals

Posted: Thu Jan 07, 2016 12:51 am
by klvs2001
Peter, thanks for the confirmation.

The Web Service I am using as a source can also produce JSON...It's just not as trivial to parse as using the externals.

So I might have to use that route IF I want to make a Web App.

Perhaps I can code an extension to parse the XML in LiveCode.

Re: HTML 5 and XML Parsing externals

Posted: Thu Jan 07, 2016 8:20 am
by peter-b
You could use the JsonImport() function from the com.livecode.library.json extension (which is included with recent LiveCode 8 DP releases), or you could use FastJson!

Re: HTML 5 and XML Parsing externals

Posted: Thu Jan 07, 2016 11:20 am
by malte
Ken Ray has a liveCode Script only library to deal with XML. I prefer the external on Desktop, but this could move you forward for your web app...

Cheers,

Malte

http://www.sonsothunder.com/products/xmllib/xmllib.htm

Re: HTML 5 and XML Parsing externals

Posted: Thu Jan 07, 2016 11:50 pm
by klvs2001
Thanks to everyone for the advice and help.

The extensions for JSON seem to work properly. FastJson doesn't seem to work for me but that is likely my ignorance.

I have not attempted the XML stack approach.

I am a bit thick on how to get the extensions to "compile" for the Web....it compiles properly for a desktop version

I have used the Standalone Settings to ask for the Json extension to be included but the Json portion of the code doesn't seem to be present

Any ideas are certainly welcome

Thank you,

Thomas