//replace with your own
var GOOGLE_KEY = "xxxxxxxxxxxxxxxxx"
var WSDL_URL = "GoogleSearch.wsdl"
WScript.echo("Connecting: " + WSDL_URL)
var Google = WScript.CreateObject("MSSOAP.SoapClient")
Google.mssoapinit(WSDL_URL, "", "", "")
hRes = Google.doGoogleSearch(
GOOGLE_KEY,
"linux-bg",
0,
10,
true,
"",
true,
"",
"",
""
)
/*
Returned from the search is a XMLDOMNodeList
*/
hRes.reset()
while( hNode = hRes.nextNode() )
{
if( hNode.nodeName == "resultElements" ) break
}
hXslDoc = new ActiveXObject( "MSXML2.FreeThreadedDOMDocument" )
hXslDoc.async = false
hXslDoc.load( "google.xsl" )
hXslTemplate = new ActiveXObject( "MSXML2.XSLTemplate" )
hXslTemplate.stylesheet = hXslDoc
hProcessor = hXslTemplate.createProcessor()
hProcessor.input = hNode
hProcessor.transform()
WScript.echo( hNode.nodeName +' \n\n '+ hNode.nodeType +' \n\n '+ hNode.xml )
WScript.echo( hProcessor.output )