VBScript code:
<%
strSourceFile=Server.MapPath("guestbook.xml")
Set objXML=Server.CreateObject("Microsoft.FreeThreadedXMLDOM")
objXML.load(strSourceFile)
Set objRootsite = objXML.documentElement.selectSing ......
Ç°ÌáÌõ¼þ:
¹«Ë¾ÓÐÒ»Ì×±ê×¼¹æ·¶µÄÒ»¸öÊý¾Ýϵͳ,ʹÓõÄÊÇxsd(Schema)¶¨ÒåºÃµÄÒ»Ì×±ê×¼Ìåϵ
Òª×öµÄÊÇ:
ÆäËûµÄ¹«Ë¾(±ÈÈ綼ÊÇÒ»¸öÀàÐ͵Ĺ«Ë¾)»á°ÑËûÃǵÄÊý¾Ý¿âºÍÊý¾Ý¶¼¸øÎÒÃÇ£¬
È»ºóÎÒÃǹ«Ë¾»á°ÑËûÃǵÄÊý¾Ý¿âÊý¾Ý(Êý¾Ý)ÐÅÏ¢¼ÓÔص½Í¨¹ýXSDÎļþ¶¨ÒåºÃµÄXMLÎļþÖ®ÖÐ,È»ºóÔÙ·Ö½â´æ´¢µ ......
ÓÐÒ»¸öCS½á¹¹µÄ´òÓ¡»ú¹ÜÀí³ÌÐò£¬´ÓXmlÎļþÖжÁÈ¡ÅäÖã¬ÅäÖÃÈçÏÂ
XML code:
<PrintMode type = "4x4">
<Printer id = "0" width = "220" height = "8">
<Print id = "0" direction = "positive" barcodeType = "code128" ......
ÎÒÏÖÔڸоõÎÒµÄweb.xmlÎļþÓÐÌ«¶àµÄÐÅÏ¢ÁË
Ïë¸øÆä·Ö×°³É¼¸¸öxmlÎļþ
ÎÒÖªµÀÔÚstrutsÖÐÓÐÕâ¸ö¼¼Êõ,µ«ÊÇÎÒÏëÖªµÀÔÚ²»Óÿò¼ÜµÄÇé¿öÏ¿ÉÒÔ.ÅäÖÃÆäËüxmlÀ´ÈÃweb.xmlÀ´¶Áȡô?
strutsÔõôʵÏֵģ¿
<init-param>
<param-name> config </param-name>
......
JScript code:
//XML HTTPÇëÇó¶ÔÏóµÄ´´½¨·½·¨
if(typeof XMLHttpRequest == "undefined" && window.ActiveXObject){
function XMLHttpRequest(){
var arrSignatures = ["MSXML2.0.XMLHTTP.5.0","MSXML2.0.XMLHTTP.4.0","MSXML2.0.XMLHTTP.3.0",
......
¶ÁÈ¡XMLÎļþ
Java code:
public class ResourceParse {
public static Document document_en_US = null;
/**
* ¾²Ì¬³ÉÔ±·½·¨
*
* ¸ºÔð ¡¾letter_resource.xml¡¿ ÅäÖÃÎļþ½âÎö²Ù×÷
*/
static {
try {
document_en_US = new SAXReader().read(Thread.cur ......