Sign in to follow this  
Followers 0
jaideept

save html output as xml

8 posts in this topic

Hello,

i want to save output of a html page which is a xml. please let me know if i can save it as xml using autoit.

Thanks,

Jaideep

Share this post


Link to post
Share on other sites



yes

Share this post


Link to post
Share on other sites

I think the code should look something like this:

#include <INet.au3>

$read = _INetGetSource ("http://www.google.com") ; be sure to use http:// in the address
FileWrite("output.xml", $read)

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

Thanks,

but in our case, we need to fill up various fields like, text boxes, radio buttons etc for few pages and finally clicking on submit button, the final page would display xml output, for e.g

<?xml version="1.0" encoding="UTF-8" ?>

- <Document>

<XMLVersion version="1.00" />

- <Record>

<PacketID />

<PacketSequence />

<Ref1 />

<Ref2 />

<Ref3 />

<Ref4 />

<FileName>3</FileName>

<FileID />

<Status type="Error" />

i tried following:

$read = _INetGetSource ($oIE)

but it is not working.

Thanks,

Jaideep

Share this post


Link to post
Share on other sites

i tried following:

$read = _INetGetSource ($oIE)

but it is not working.

Is $oIE a URL string in your script? Or is that an IE object?

Share this post


Link to post
Share on other sites

it is an IE object.

Share this post


Link to post
Share on other sites

It needs to be an actual URL string. In general, only use IE objects with IE functions. INet functions are not designed for them.

Share this post


Link to post
Share on other sites

thanks Beege,

on that note, i have to use IE object to navigate initial url, then filling up various fields like, text boxes, radio buttons up to few pages and finally clicking on submit button, the final page would display xml output. is there any way to capture the xml rendered in IE and save it as xml.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0