Im trying to implement a Javascript in tandem with swfObject that passes the HTML that gets replaced to flash, and then flash is gonna parse it as XML (seeing as well-formed XHTML is XML anyway)
so i was using
var sourceXMLVar = document.getElementById("wines").parentNode.innerHTML;
sourceXMLVar = sourceXMLVar.replace(/"/g, "'");
and it works fine in Firefox. i had to strip out the double-quotes but once i pass the vars to flash and parse it as XML it works perfectly.
but for some reason when i get the innerHTML in IE 6 or 7 - its all messed up. for instance, all the tag names are capitilised, and all the attributes except for href dont have any double-quotes (eg, <div class=“test”> gets turned into <DIV class=test> )
so after lots of reading about UA’s, tag soup, xhtml with text/html mime types and so forth, im totally stumped…
is it possible in both IE and Firefox (or preferably as many browsers as possible), to use javascript to create a string that contains all the html contained in a specific element, say a div?