Jump to content

XML to string


Dieuz
 Share

Recommended Posts

Hey guys,

I am using The Yahoo Site Explorer api and when I send an html request, it returns a XML page.

How can I convert this XML source page to a string without downloading the .xml file?

Request example: http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid=YahooDemo&query=http://search.yahoo.com&results=2

Thanks!

;)

Edited by Dieuz
Link to comment
Share on other sites

XML is a plain text format. Did you save the returned data to a file?

$sString = FileRead("C:\Temp\YourFile.xml")

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

XML is a plain text format. Did you save the returned data to a file?

$sString = FileRead("C:\Temp\YourFile.xml")

;)

Well I would like NOT to save the XML file because I have alot of check to do and I dont want to save/delete 1000+ files on my computer. How could I just retrieve the xml source page direct from the browser.

Edited by Dieuz
Link to comment
Share on other sites

I don't know anything about the "Yahoo Site Explorer api". When you say that "it returns a XML page", where is it returned to?

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I don't know anything about the "Yahoo Site Explorer api". When you say that "it returns a XML page", where is it returned to?

;)

Heres an example of a request and what it return:

http://search.yahooapis.com/SiteExplorer...&query=http://search.yahoo.com&results=2

Link to comment
Share on other sites

This works:
#include <INet.au3>

$sXML = _INetGetSource("http://search.yahooapis.com/SiteExplorer")
ConsoleWrite("$sXML = " & $sXML & @LF)

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...