Dom|javascript|xml
For XSL, the content of the XML node, as long as the pairing of <> and </> does not affect the display of the XML document, will be omitted, without any stylistic meaning (even tag in html).
The most critical problem for xml,xsl is: the matching of tag characters.
For the display of xsl: must be a parent node, several equal child nodes. When the child nodes appear multiple times under the same parent node, consider adding a layer of the same node and placing the original node under the same node as the principle of appearing or appearing alone.
For XSL-supported XPath hierarchies, it is necessary to "climb trees" to display an XML document with XSL. (Remember: first/root, single/layer,//= tree (//) for the entire document,.//is the root of the current node),. As the parent, @ is the attribute, the first string is a child) of course, can also through the <xsl:apply-templates select= "" >,<xsl:template match= "" "> to achieve the display between the nodes conversion; And template can also cascade down calls. When sorting is required, <xsl:for-each select= "./dk" order-by= "CHUA/JFDJF" >...</for-each> This is an ascending sort, which, when ordered in descending order, is added before the order-by value-that is, <xsl:for-each select= "./dk" order-by= "-chua/zi" >...</for-each>
When using XML and XSL for pages in JavaScript, look at two questions:
The 1.javascript page cache may affect the display of the page. Can pass the way of blocking JS, but connected to a generation by Jsp/servlet. js file (and Response.setheader ("Cache-control", "On-cache") And so on. Then connect to the JavaScript file with JavaScript on the main page.
namely: <script src= ' sript.jsp ' type= ' jsp/javascript ' can be/>.
2. When displaying a page using a server-generated or existing XML or XSL file or string. You must specify that these files or strings are read and parsed in the following way: doc.async=false;//do not allow asynchronous reading of data
doc.validateonparse=false;//does not analyze validity
Otherwise, a page error appears in javascript: ' The data required to complete the operation is not available '.
When using the XMLHTTP request, use the. Send (Doc) method. Cases
var xmlhttp=new activexobject ("msxml2.xmlhttp");
Xmlhttp.open ("Post", "http://59.64.71.16:7001/MagazineResearchStageWeb/MagazineInfoResearch.jsp", false);
Xmlhttp.setrequestheader ("Content-type", "application/x-www-form-urlencoded");
Xmlhttp.setrequestheader ("Content-length", root.length);
Xmlhttp.send (root); alert (root);
document.write (Xmlhttp.responsetext);
Note: Do not use the. SendXML method, not supported. and. Send () can be either an XML Document object or a string. HTML pages that are not framed can have errors when sending XML using the XMLHTTP technology, and need to be lowered to use the security level, because some of the more powerful features of XMLHTTP threaten the safety of the machine. Like the previous MSXML, it supports accessing XML documents submitted on the local file system and sending them to the server. Not now. These can only explain that the client's processing function is stronger, the security is lower. This is also the emergence of customer security certification signature One of the reasons!