XML + XSL application, URL encoding problem containing Chinese characters

zhaozj2021-02-16  35

In XML applications, some URL information is often stored as XML data, where the URL parameter may contain Chinese characters. The Chinese characters can be encoded when XML data is parsed with the DOM. However, if only XSLT is used to display XML data (Data.xml Data.xsl), the URL at this time will have an encoded error. Even if the coding type (Encoding = "GB2312"), the same problem will still occur. Test Discover: It is the problem of IE's caching mechanism, IE will still put the new page (the URL of the URL) default to Text / XML

Workaround: 1. Specify the output document type is an XML document (Example: data.xsl) 2. In the new window Open, add the attribute to the connection, indicate the target window for other windows (Example: Data2.xsl) _ blank

EXAMPLES:

/ *** DATA.XML *** /

http: // www .golex.com / search? q = XML Data http://www1.baidu.com/baidu?word= XML Data http://www.google.com/search?Q= Extreme Programming (XP) < / search> http://www1.baidu.com/baidu?word= Extreme Programming (XP)

/ *** DATA.XSL *** /


/ *** DATA2.XSL *** /

_ blank

: _)

转载请注明原文地址:https://www.9cbs.com/read-26460.html

New Post(0)