Cannot read stream from an XML response

4 posts in this topic

mburr 0

I am working on a program that is collecting user information and creating an html file from these files and then launching these in an unattended IE session using the _IECreate command in AutoIT. The response from this is an automatically generated xml file which is then displayed back on the browser. I am trying to figure out a manner in which I can get the contents of that xml file from the browser so I can parse it for additional information for a secondary response, but the file is not locally cached on the machine or the server and is a generic URL that cannot be loaded by simply entering the URL.

I have tried the Run command and used the $STDIN_CHILD option, as well as the ConsoleRead and ConsoleWrite in hopes of capturing the xml creation, but that did not appear to work as I would only get back the result of 0 or 1.

I am wondering if anyone else has run into this situation and if they had any solutions? I am also working with the developer for the other program to see if they had any suggestions as well.

Share this post

Link to post

Share on other sites

BrettF 24

First off code is a great addition to a pretty good first post. This lets us see what you are doing. If you can't post the full code due to it being 1000 lines long (no one will look at it) or because it contains sensitive information; post a script that can replicate the problem.

If you're using IE and you can get the XML output using that then all you really have to do is get XML into your script for further parsing is use the following function:

_IEDocReadHTML ( ByRef $o_object )

If you still run into troubles post some code we can work with and we'll try give you a hand.

Also why I think of it, make sure you get the full version of SciTE4AutoIt3. This version has more features than the one included with AutoIt and makes for a much more pleasurable developing experience.

Share this post

Link to post

Share on other sites

mburr 0

Thanks for the response. I looked at the information that you sent and I tried to incorporate the files, but that did not seem to do the trick. I am getting a result, but it is a "0" only. The code is as follows: