In the document "getting XML data and formatting Using Style Sheets", you can use text to retrieve XML data or XML to retrieve returned data. See:
<% @ Page contenttype = " Text/html; charset = GBK " %>
< Script Language = " Javascript " SRC = " JS \ request. js " > </ Script >
< Script Language = " Javascript " >
Function showxml () {
VaR URL = " Vehicles. xml " ;
// Note that text is not used here.
Get_request (URL, " XML " );
// Get_request (URL, "XML ");
}
// Note This // Pagechange (responsetext ){
Function pagechange (responsexml) {
VaR XML = New Activexobject ( " Microsoft. xmldom " );
XML. async = False ;
// Load the text of XML data
XML. Load (responsexml );
// XML. loadxml (responsetext );
VaR XSL = New Activexobject ( " Microsoft. xmldom " );
XSL. async = False ;
// Load the XSL
XSL. Load ( " Vehicles. XSL " );
VaR Div = Document. getelementbyid ( " Show " );
Div. innerhtml = XML. transformnode (XSL );
/**/ /*
Load () function load XML file
The loadxml () function loads XML data in the string format.
*/
}
</ Script >
< P >
< Input type = " Submit " Name = " Submit " Value = " Submit " Onclick = " Showxml () " />
</ P >
< Div ID = " Show " > </ Div >
Note: The comments in this text are common and different.