日韩欧美人妻无码精品白浆,www.大香蕉久久网,狠狠的日狠狠的操,日本好好热在线观看

LOGO OA教程 ERP教程 模切知識(shí)交流 PMS教程 CRM教程 開發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

XMLDOM手冊

admin
2011年4月13日 14:51 本文熱度 3950

  XMLDOM是用來訪問和操作XML文檔的編程接口規(guī)范。

  1、簡介
  XMLDOM被設(shè)計(jì)為可用于任何語言和任何操作系統(tǒng)。借助DOM,程序員可以創(chuàng)建XML文檔、遍歷其結(jié)構(gòu),增、改、刪其元素。DOM將整個(gè)XML文檔視作一棵樹,文檔級的元素是樹的根。

  2、MS的XML解析,IE5.0以上。
  是一個(gè)COM組件,至少包含下列對象:
 ?。?)Micosoft.XMLDOM
 ?。?)Micosoft.XMLDOM.parseError,有如下屬性:

Property Description
errorCode Returns a long integer error code
reason Returns a string explaining the reason for the error
line Returns a long integer representing the line number for the error
linePos Returns a long integer representing the line position for the error
srcText Returns a string containing the line that caused the error
url Returns the url pointing the loaded document
filePos Returns a long integer file position of the error

 ?。?)Microsoft.XMLHTTP,有如下屬性:
Property Description
readyState Returns the state of the document
responseBody Returns the response as an array of unsigned bytes
responseStream Returns the response as an IStream
responseText Returns the response as a string
responseXML Returns the response as an xml document
status Returns the status code as a number
statusText Returns the status as a string
有如下方法:
Property Description
abort() Cancel the current http request
getAllResponseHeaders() Returns the value of the http headers
getResponseHeader(headerName) Returns the value of one specified http header
open(method, url, async, userid, password) Opens http request, and specifies the information
send() Send the http request to the server
setRequestHeader(headerName,headerValue) Specifies the name of a http header

 ?。?)Node的類型
nodeType Named Constant nodeTypeString nodeName nodeValue
1 ELEMENT_NODE element tagName null
2 ATTRIBUTE_NODE attribute name value
3 TEXT_NODE text #text content of node
4 CDATA_SECTION_NODE cdatasection #cdata-section content of node
5 ENTITY_REFERENCE_NODE entityreference entity reference name null
6 ENTITY_NODE entity entity name null
7 PROCESSING_INSTRUCTION_NODE processinginstruction target content of node
8 COMMENT_NODE comment #comment comment text
9 DOCUMENT_NODE document #document null
10 DOCUMENT_TYPE_NODE documenttype doctype name null
11 DOCUMENT_FRAGMENT_NODE documentfragment #document fragment null
12 NOTATION_NODE notation notation name null

  W3C規(guī)定的屬性:
Property Description
attributes Returns a NamedNodeMap containing all attributes for this node
childNodes Returns a NodeList containing all the child nodes for this node
firstChild Returns the first child node for this node
lastChild Returns the last child node for this node
nextSibling Returns the next sibling node. Two nodes are siblings if they have the same parent node
nodeName Returns the nodeName, depending on the type
nodeType Returns the nodeType as a number
nodeValue Returns, or sets, the value of this node, depending on the type
ownerDocument Returns the root node of the document
parentNode Returns the parent node for this node
previousSibling Returns the previous sibling node. Two nodes are siblings if they have the same parent node

  W3C規(guī)定的方法:
Method Description
appendChild(newChild) Appends the node newChild at the end of the child nodes for this node
cloneNode(boolean) Returns an exact clone of this node. If the boolean value is set to true, the cloned node contains all the child nodes as well
hasChildNodes() Returns true if this node has any child nodes
insertBefore(newNode,refNode) Inserts a new node, newNode, before the existing node, refNode
removeChild(nodeName) Removes the specified node, nodeName
replaceChild(newNode,oldNode) Replaces the oldNode, with the newNode

 

 ?。?)NodeList的W3C規(guī)定的屬性和方法。

Property Description
length Returns the number of nodes in a nodeList

Method Description
item Returns a specific node in the nodeList

XMLHTTP對象及其方法
------------------
MSXML中提供了Microsoft.XMLHTTP對象,能夠完成從數(shù)據(jù)包到Request對象的轉(zhuǎn)換以及發(fā)送任務(wù)。
創(chuàng)建XMLHTTP對象的語句如下:
Set objXML = CreateObject("Msxml2.XMLHTTP") 或
Set objXML = CreateObject(“Microsoft.XMLHTTP”)
' Or, for version 3.0 of XMLHTTP, use:
' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
對象創(chuàng)建后調(diào)用Open方法對Request對象進(jìn)行初始化,語法格式為:
poster.open http-method, url, async, userID, password
Open方法中包含了5個(gè)參數(shù),前三個(gè)是必要的,后兩個(gè)是可選的(在服務(wù)器需要進(jìn)行身份驗(yàn)證時(shí)提供)。參數(shù)的含義如下所示: 
http-method: HTTP的通信方式,比如GET或是 POST
url: 接收XML數(shù)據(jù)的服務(wù)器的URL地址。通常在URL中要指明 ASP或CGI程序
async: 一個(gè)布爾標(biāo)識(shí),說明請求是否為異步的。如果是異步通信方式(true),客戶機(jī)就不等待服務(wù)器的響應(yīng);如果是同步方式(false),客戶機(jī)就要等到服務(wù)器返回消息后才去執(zhí)行其他操作
userID 用戶ID,用于服務(wù)器身份驗(yàn)證
password 用戶密碼,用于服務(wù)器身份驗(yàn)證
XMLHTTP對象的Send方法
用Open方法對Request對象進(jìn)行初始化后,調(diào)用Send方法發(fā)送XML數(shù)據(jù):
poster.send XML-data
Send方法的參數(shù)類型是Variant,可以是字符串、DOM樹或任意數(shù)據(jù)流。發(fā)送數(shù)據(jù)的方式分為同步和異步兩種。在異步方式下,數(shù)據(jù)包一旦發(fā)送完畢,就結(jié)束Send進(jìn)程,客戶機(jī)執(zhí)行其他的操作;而在同步方式下,客戶機(jī)要等到服務(wù)器返回確認(rèn)消息后才結(jié)束Send進(jìn)程。
XMLHTTP對象中的readyState屬性能夠反映出服務(wù)器在處理請求時(shí)的進(jìn)展?fàn)顩r。客戶機(jī)的程序可以根據(jù)這個(gè)狀態(tài)信息設(shè)置相應(yīng)的事件處理方法。屬性值及其含義如下表所示:
值 說明
0 Response對象已經(jīng)創(chuàng)建,但XML文檔上載過程尚未結(jié)束
1 XML文檔已經(jīng)裝載完畢
2 XML文檔已經(jīng)裝載完畢,正在處理中
3 部分XML文檔已經(jīng)解析
4 文檔已經(jīng)解析完畢,客戶端可以接受返回消息
客戶機(jī)處理響應(yīng)信息
客戶機(jī)接收到返回消息后,進(jìn)行簡單的處理,基本上就完成了C/S之間的一個(gè)交互周期??蛻魴C(jī)接收響應(yīng)是通過XMLHTTP對象的屬性實(shí)現(xiàn)的:
● responseTxt:將返回消息作為文本字符串;
● responseXML:將返回消息視為XML文檔,在服務(wù)器響應(yīng)消息中含有XML數(shù)據(jù)時(shí)使用;
● responseStream:將返回消息視為Stream對象。
 

下面的xml文件是動(dòng)態(tài)生成的最后用xmlHTTP傳送出去,這是一個(gè)在客戶端JavaScript腳本里的內(nèi)容,當(dāng)然你也可以寫在服務(wù)器,但是要相應(yīng)的改一些東西:(僅供大家參考,了解它的用法)
var xmlDoc=new ActiveXObject("MSXML2.DOMDocument");
flag=xmlDoc.loadXML("");

  newNode =xmlDoc.createElement("編碼")
  MarkNode=xmlDoc.documentElement.appendChild(newNode);
  newNode =xmlDoc.createElement("StartMark")
  newNode.text=StartMark;
  MarkNode.appendChild(newNode)
  newNode =xmlDoc.createElement("EndMark")
  newNode.text=EndMark;
  MarkNode.appendChild(newNode)
 
  newNode =xmlDoc.createElement("日期")
  DateNode=xmlDoc.documentElement.appendChild(newNode);
  newNode =xmlDoc.createElement("StartDate");
  newNode.text=StartDate;
  DateNode.appendChild(newNode)
  newNode =xmlDoc.createElement("EndDate")
  newNode.text=EndDate;
  DateNode.appendChild(newNode);
 
  newNode =xmlDoc.createElement("數(shù)量")
  SLNode =xmlDoc.documentElement.appendChild(newNode);
  newNode =xmlDoc.createElement("StartSL")
  newNode.text=StartShuL
  SLNode.appendChild(newNode)
  newNode =xmlDoc.createElement("EndSL");
  newNode.text=EndShuL
  SLNode.appendChild(newNode);
 
  newNode =xmlDoc.createElement("單價(jià)")
  DJNode =xmlDoc.documentElement.appendChild(newNode)
  newNode =xmlDoc.createElement("StartDJ")
  newNode.text=StartDanJ;
  DJNode.appendChild(newNode);
  newNode =xmlDoc.createElement("EndDJ")
  newNode.text=EndDanJ;
  DJNode.appendChild(newNode);
 
  newNode =xmlDoc.createElement("金額")
  JENode =xmlDoc.documentElement.appendChild(newNode)
  newNode =xmlDoc.createElement("StartJE")
  newNode.text=StartJinE
  JENode.appendChild(newNode)
  newNode =xmlDoc.createElement("EndJE")
  newNode.text=EndJinE
  JENode.appendChild(newNode)
 
  newNode =xmlDoc.createElement("倉庫代碼")
  newNode.text=CK;
  xmlDoc.documentElement.appendChild(newNode)
 
  newNode =xmlDoc.createElement("票號")
  newNode.text=RKPH;
  xmlDoc.documentElement.appendChild(newNode)
 
  newNode =xmlDoc.createElement("單位代碼")
  newNode.text=CorpName;
  xmlDoc.documentElement.appendChild(newNode)
 
  newNode =xmlDoc.createElement("BiaoShi")
  newNode.text=Biaoshi
  xmlDoc.documentElement.appendChild(newNode)
 
  newNode =xmlDoc.createElement("FindCate")
  newNode.text=FindCate
  xmlDoc.documentElement.appendChild(newNode)
 
  var xh =new ActiveXObject("MSXML2.XMLHTTP")
  xh.open("POST","Find.asp",false)
  xh.setRequestHeader("Content-Type","text/xml")
  xh.setRequestHeader("Content-Type","gb2312")
  xh.send(xmlDoc);
我的每一個(gè)newNode的text值是一個(gè)變量,也就是我客戶端form 中input的值


該文章在 2011/4/13 14:52:24 編輯過
關(guān)鍵字查詢
相關(guān)文章
正在查詢...
點(diǎn)晴ERP是一款針對中小制造業(yè)的專業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國內(nèi)大量中小企業(yè)的青睞。
點(diǎn)晴PMS碼頭管理系統(tǒng)主要針對港口碼頭集裝箱與散貨日常運(yùn)作、調(diào)度、堆場、車隊(duì)、財(cái)務(wù)費(fèi)用、相關(guān)報(bào)表等業(yè)務(wù)管理,結(jié)合碼頭的業(yè)務(wù)特點(diǎn),圍繞調(diào)度、堆場作業(yè)而開發(fā)的。集技術(shù)的先進(jìn)性、管理的有效性于一體,是物流碼頭及其他港口類企業(yè)的高效ERP管理信息系統(tǒng)。
點(diǎn)晴WMS倉儲(chǔ)管理系統(tǒng)提供了貨物產(chǎn)品管理,銷售管理,采購管理,倉儲(chǔ)管理,倉庫管理,保質(zhì)期管理,貨位管理,庫位管理,生產(chǎn)管理,WMS管理系統(tǒng),標(biāo)簽打印,條形碼,二維碼管理,批號管理軟件。
點(diǎn)晴免費(fèi)OA是一款軟件和通用服務(wù)都免費(fèi),不限功能、不限時(shí)間、不限用戶的免費(fèi)OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved

日韩中文乱码av| 亚 洲 视 频 高 清 无 码| 久久99视频这里综合| 哦美午夜精选国产| 美女干B视频免费看| 精品女教师| 中文字幕日韩精品一区| 日韩99在线视频| 毛片精品| 人人妻人人干人人射| 久久精品美女影院99热| 日韩午夜福利一区二区福利| 日本成人片免费久久久| 日韩网站久久| 欧美日韩一区二区三区性| 成人黄色av中文在线| 国产精品福利一二三| 自拍日韩亚洲欧美| 国精品久久久| 欧美另类国产中文| 勐海县| 日本一区二区三区免费高清不卡| www黄久久久| 欧美精产国品一区二区三区在线| 国产99久久九九精品无码性色| 真麻一区二区三区| 91色色婷| 黑吊一区二区| 激情五月99综合| 日韩精品久久无码中文字幕附近少妇 | 久久久久久久久久久久高清无码| 韩日精品不卡一区| 松潘县| 色美韩日欧一区| 成人欧美精品久久| 老司机久久一区二区三区四区| 色婷婷人妻av| 亚洲一级a中文字幕一区二区| 亚洲人妖无码精品| 啪啪啪不卡| 无码α片|