XML's can be transformed by a browser using XSL. This can be either done by referencing an xsl within the xml by adding the following line within the xml file:
<?xml-stylesheet type='text/xsl' href='sample.xsl'?>
Opening this xml file now with internet explorer will display the correct data in the browser.
The XML itself references many other files as e.g. pictures which are located in some folder.
I want to save the data displayed (with all the referenced data) in one single mhtml file (*.mht)
How do I proceed? And is this possible?
Note: Files are all local (not on a server) and the initial xml is a result of test data. I just want my XML file to be displayed correctly as before started from a single file without accessing other data outside the mhtml file.
Edit upon answer 1:
I have included my xml within an iFrame of an HTML:
<body><iframe src="name.xml" width = "100%" height="1000">
</iframe></body>
This I have saved using IE into an *.mht file:
From: <Saved by Windows Internet Explorer 7>
Subject: XML-Test
Date: Wed, 22 Feb 2012 14:47:34 +0100
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_NextPart_000_0000_01CCF170.E99B1DF0"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01CCF170.E99B1DF0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Content-Location: file://C:\Documents and Settings\STEFFAN\Desktop\Test\XML-Test.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>XML-Test</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.6000.17107" name=3DGENERATOR></HEAD>
<BODY><IFRAME=20
src=3D"http://www.m.de/name.xml"=20
width=3D"100%" height=3D1000>
</IFRAME></BODY></HTML>
------=_NextPart_000_0000_01CCF170.E99B1DF0
Content-Type: text/xml;
charset="unicode"
Content-Transfer-Encoding: base64
Content-Location: http://www.m.de/name.xml
//48ACEARABPAEMAVABZAFAARQAgAEgAVABNAEwAIABQAFUAQgBMAEkAQwAgACIALQAvAC8AVwAz
AEMALwAvAEQAVABEACAASABUAE0ATAAgADQALgAwACAAVAByAGEAbgBzAGkAdABpAG8AbgBhAGwA...
Since I use local files originally instead of "http://www.m.de/name.xml" "file://C:\Documents and Settings\STEFFAN\Desktop\Test\SUPL_TCLog.xml" was outputted by IE.
But this local reference does not seem to work for mhtml, which sucks and therefore, I used a random substitute (http://www.m.de/name.xml) for it. (this works fine for image files). Changing it accordingly opening the mht file will start a download of the xml file. But this is not wanted. I want it to be displayed.
What is missing?
I did try some attempts, but was not successful. Also Francis Avila's proposal I could not solve successful.
Especially code referenced by javascript also contained other references. I did not know how to resolve these and put them into mhtml.
Maybe using Altova StyleVision would be a solution.
Since I did not longer try. I close this thread.