|We don't bite newbies here... much|
Telnet, XML API, and I/O Bufferingby BluePerlDev (Initiate)
|on Jul 27, 2010 at 19:08 UTC||Need Help??|
BluePerlDev has asked for the
wisdom of the Perl Monks concerning the following question:
Telnet, XML API, and I/O Buffering
Greetings, again, O Wise Monks. I have a bit of an issue in dealing with an API that uses XML to drive it, and I know that there has to be a (relatively) simple way to do what I'm attempting. All the pertinent details are below:
Problem: Need to use the API of an aplication to get a list of items in its internal database.
Analysis:What I have so far is two different ways to approach this:
The problem that I am running into is, if I use print and read, the interactivity with the application suffers, and I can't seem to get it to recognize that I sent it a request, so my script just hangs.
Likewise, if I use sysread/syswrite, I get the interactivity, and get some of the output, but the XML::LibXML parser dies because I don't capture all of the output...
Code snippets:This is what I'm working with:
From there, the two options I have tried are:
or, using sysread
What recommendations can ou give me on the optimal way to perform this task?Many Thanks in Advance