[EMAIL PROTECTED] wrote:
Hello. I've been building and returning some simple pages from Unidata to
PHP, but I now have a big complex report to adapt. Is there someway that
I can take advantage of the TOXML verb by CAPTURING the XML and returning
it to the calling PHP?
I tried something like this.
ECMD = "SELECT .... TOXML"
EXECUTE ECMD CAPTURING RESULT (where RESULT is returned to the calling
PHP program.but got the error message:
protocol error: , Invalid document end at col 32. Check the back end log
for details.
I suspect this is due to the marks separating the dynamic array elements.
Will something like this work, or am I barking up the wrong tree?
And where is the backend log?
Perhaps a different approach?
Assuming that you're calling/executing a Universe/Unidata program from
within PHP.
1) Issue a SEPTR command with mode = 3 to send output to the &HOLD&
directory.
2) LIST somefile field1 field2 field3 TOXML LPTR to send the output you
want to the &HOLD& directory in XML format.
3) Use code within your program to READ the record (aka file), within
the &HOLD& directory into variable RESULT.
4) Pass the RESULT back to PHP
I played with the TOXML keyword briefly this morning on a Universe
system, bringing the result back to a MS desktop and importing into
Excell. When I did so, I found that I had to strip extraneous cr/lf
sequences from the beginning of the XML file I'd created.
Rgds.
--
Allen Egerton
aegerton at pobox dot com
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/