Dieuz Posted December 14, 2009 Share Posted December 14, 2009 (edited) 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 December 14, 2009 by Dieuz Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 14, 2009 Share Posted December 14, 2009 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 More sharing options...
Dieuz Posted December 14, 2009 Author Share Posted December 14, 2009 (edited) 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 December 14, 2009 by Dieuz Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 14, 2009 Share Posted December 14, 2009 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 More sharing options...
Dieuz Posted December 14, 2009 Author Share Posted December 14, 2009 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 More sharing options...
PsaltyDS Posted December 14, 2009 Share Posted December 14, 2009 Heres an example of a request and what it return: http://search.yahooapis.com/SiteExplorer...&query=http://search.yahoo.com&results=2 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 More sharing options...
Authenticity Posted December 14, 2009 Share Posted December 14, 2009 ..or Local $oXML = ObjCreate('Microsoft.XMLHTTP') $oXML.Open("POST", "http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid=YahooDemo&query=http://search.yahoo.com&results=2", 0) $oXML.Send ConsoleWrite($oXML.responseText & @CRLF) Link to comment Share on other sites More sharing options...
Dieuz Posted December 14, 2009 Author Share Posted December 14, 2009 (edited) This works: #include <INet.au3> $sXML = _INetGetSource("http://search.yahooapis.com/SiteExplorer") ConsoleWrite("$sXML = " & $sXML & @LF) Yay it works! Thanks Psalty! Edited December 14, 2009 by Dieuz Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now