XML to Stack via PHP

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hsthompson
Posts: 10
Joined: Fri Mar 14, 2008 8:13 pm

XML to Stack via PHP

Post by hsthompson » Tue Jun 16, 2009 7:12 pm

Please bear with me, as I'm not very familiar with RR.

My company uses software our RR programming consultant wrote that converts standard XML files to stacks. I don't know whether this is a built in function or something he had to write.

My task is writing a PHP web interface for doing something similar. Is it possible to use PHP to perform or trigger the conversion of an XML file to a stack?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 17, 2009 8:11 am

Dear hsthompson,

Just ask the RunRev guy for the code and translate it o PHP. It should be relatively easy, even though handling the binary stuff might be slightly complicated.

Btw, I created a stack2xml routine too and would be interested in your solution. Do you think we could exchange something? (My XML routine is not public).

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 17, 2009 11:24 am

hsthompson,

Giving this a little more thought... whenever you make a stack from an XML file, your purpose is to open a stack with a standalone or in the Revolution IDE. You could make a plug-in for the Revolution IDE to convert your XML to stacks and give this plug-in to your customers. You could also include the code of your colleague in your standalones and convert the XML files to stacks after opening the XML files as regular documents. No PHP solution needed.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

hsthompson
Posts: 10
Joined: Fri Mar 14, 2008 8:13 pm

Post by hsthompson » Thu Jun 18, 2009 6:45 pm

Mark,

I'd be happy to share the solution, should I find one.

I should clarify my task, though. The PHP application overlaps with the RR software somewhat, but they're not interchangeable. The only function they'll both have in common will be creating the stacks from XML. Additionally, whatever method I use will have to be triggered by a PHP script accessed via the Web. We'll be in control of implementation to our customized servers, but the functions should be accessible from anywhere without special software on the client's machine.

A possible angle I'm checking is something called "PHP Shell," which allows PHP to run arbitrary shell commands (we're using Mac OS X), and from there I'd specify an "open" command with an "open with" attribute, and pop the XML open in some kind of RR droplet that would convert it and exit.

Post Reply