Olá a todos,
Tenho o seguinte trecho em javascript…
dtmlXMLLoaderObject.prototype.loadXML = function(filePath) {
try {
this.xmlDoc = new XMLHttpRequest();
this.xmlDoc.open("GET", filePath, true);
this.xmlDoc.onreadystatechange = new this.waitLoadFunction(this);
this.xmlDoc.send(null);
} catch(e) {
if (document.implementation && document.implementation.createDocument) {
this.xmlDoc = document.implementation.createDocument("", "", null);
this.xmlDoc.onload = new this.waitLoadFunction(this);
} else {
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.async = "true";
this.xmlDoc.onreadystatechange = new this.waitLoadFunction(this);
}
this.xmlDoc.load(filePath);
}
};
O código está funcionando perfeitamente para ler dados de um arquivo XML em disco.
O que eu preciso fazer é ler o xml a partir da memória.
Estava pensando em passar todo o XML ao invés do filePath do arquivo.
Alguém tem alguma idéia??
Desde já agradeço…