Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Elaborazione dei testi letterali (http://www.dsy.it/forum/forumdisplay.php?forumid=101)
-- [ETL] Comandi di base (http://www.dsy.it/forum/showthread.php?threadid=19431)
[ETL] Comandi di base
Spero che a qualcuno possa essere utile
code:
//Apertura di una pagina in IE e dichiarazione della variabile doc //(document rappresenta la struttura principe di una pagina html) var http; var oIE = new ActiveXObject("InternetExplorer.Application"); oIE.Navigate(""); var doc = oIE.Document; //Richiesta di info su una determinata pagina html ("http://www.dsi.unimi.it"). //La risposta รจ inserita in doc. try { http = new ActiveXObject("Microsoft.XMLHTTP"); http.open("GET", "http://www.dsi.unimi.it", false); http.send(); doc.write(http.responseText); } catch (e) { WScript.echo("Errore: "+e.description); } //Dichiarazione oggetti xml var xmldoc = new ActiveXObject("Msxml2.DOMDocument"); xmldoc.async = false; xmldoc.validateOnParse = true; //Creazione e inserimento nel documento xml della Processing Instruction var objPI = xmldoc.createProcessingInstruction('xml','version="1.0"'); xmldoc.appendChild(objPI); //Creazione e inserimento nel documento xml della radice file xml var rootElement = xmldoc.createElement("Sito"); xmldoc.documentElement = rootElement; //Salvataggio del documento xml xmldoc.save("E_XercizioArmen.xml"); WScript.echo("Documento XML creato e salvato!");
__________________
My Blog...take a look!
"Never give out your password or credit card number in an instant message conversation."
ETL Malcangi
All times are GMT. The time now is 06:56. | Show all 1 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.