A Simple Analysis of *. MHT file structure

Source: Internet
Author: User

Recently, I used the excel2003 file to directly generate a requirement analysis. the MHT file is then mapped by the web system. A simple application of indexing MHT files has caused the author. if you are interested in analyzing the MHT file structure, we will present your experiences as follows for your reference only:

1. Use MSIE to open the. MHT file directly and analyze the content in "View/source file;

2. I found that. when the MHT file is running, its page content contains several Chinese characters,. MHT source file does not have any Chinese content, and then analyzes whether the content of the corresponding decoding reference, the only found is a reference file is "http://www.w3.org/TR/REC-html40", but unfortunately, this file is not a decoded file. Later, I found that all the similar "& #34920;" structures have repeated signs, so I tried to copy different "& #34920; "After saving, the page content changes in the running status, so I decided. MHT adopts an unconventional encoding format and finally finds "<meta http-equiv = 3dcontent-type content = 3D" text/html; charset = 3dus-ascii ">", after testing, any HTM page using this encoding can successfully parse a structure similar to "& #34920;

3. The author's. MHT file is directly generated by the excel2003 file. This file contains multiple worksheet, that is, the content of multiple forms. How to Implement integration in. MHT? Deciphering. after decoding the MHT structure ("<meta http-equiv = 3dcontent-type content = 3D" text/html; charset = 3dus-ascii ">), you can clearly find it. the source code of the MHT file contains multiple segments "<HTML>

4. of course, Microsoft directly generates the excel2003 file. the Javascript script technology is used in the process of MHT file files to implement switching between multiple pages. The code is not described here. Interested readers can try to analyze it by themselves, here, I need to mention Microsoft's usage in JavaScript scripts, as follows:

Function fnbuildframeset ()
{
VaR szhtml = 3D "subsequent special usage, somewhat similar to VB6 ";

With (document ){
Open ("text/html", "replace ");
Write (szhtml );
Close ();
}

}

5. We hope to discuss more about. MHT with more colleagues.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.