vu******@gmail.com wrote:
I still believe this may work:
var iframe = document.getElementById("myiframe");
var obj = iframe.contentDocument.open("text/xml");
obj - is an HTML object of iframe document. If I know how to make it an
XML object, I am done with my problem.
Any thoughts and ideas are VERY welcome.
You are still missing the picture: the problem is not in using iframe
for XML document. The problem is that iframe having a content (any
content) from another domain is not accessible from the main document.
Not because there are not methods to do it: but because these methods
are blocked for any kind of cross-domain communication.
With the same luck you could simply override the <scriptelement (IE
only though):
<script type="text/xml" src="data.xml"></script>
<script type="text/jscript">
var DynamicSource;
var DataIsland;
function demo() {
DynamicSource = document.scripts[0];
DataIsland = DynamicSource.XMLDocument;
window.alert(DataIsland.firstChild.nextSibling.nod eName);
}
window.onload = demo;
</script>
Works like a charm on the same domain, "Access denied" else.