[Project_owners] Using JavaScript to access XML and transformed HTML

Stan James sjames at uni-osnabrueck.de
Sun Feb 20 00:41:27 EST 2005


Alex Vincent wrote:

>>Hi everyone,
>>
>>Let's say I have an XML file, test.xml, which has a XSL stylesheet
>>attached using the line:
>>
>>   <?xml-stylesheet type="text/xsl" href="test.xsl"?>
>>
>>In Mozilla, can I access both the XML source and the rendered HTML using
>>the DOM?  If so, how?
>>    
>>
>
>Sorry, this is not directly possible:
>https://bugzilla.mozilla.org/show_bug.cgi?id=153281
>  
>
Damn. I was wondering about that too.

A workaround is to grab the URL from the DOM, and then load the XML 
(again) using XMLHttpRequest(). It's redundant, but it should work.

Does anyone know if XMLHttpRequest uses the browser cache? If it does, 
then this hack is not really so inefficient, but merely ugly.  :)

-stan


ps Now that I think of it, can anyone point me to info about caching in 
Firefox?


More information about the Project_owners mailing list