xtanxin 发表于 2010-6-1 19:34:01

奇怪,AU3的UDF:_XMLDomWrapper 有open,没有close?版主给解惑一下

难道不需要???关闭?

如果能直接操作,怎么还需要open??

#cs defs to add to au3.api
        _XMLCreateCDATA($sNode, $sCDATA) Create a CDATA SECTION node directly under root. (Requires: #include <_XMLDomWrapper.au3>)
        _XMLCreateChildNode($XPath, $sNode, [$sData = ""]) Create a child node under the specified XPath Node.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLCreateChildNodeWAttr($sXPath, $sNode, $avAttr, $avVal,[$sData =""]) Create a child node under the specified XPath Node with Attributes. (Requires: #include <_XMLDomWrapper.au3>)
        _XMLCreateComment($sNode, $sComment)Create a COMMENT node at specified path.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLCreateFile($sPath, $sRootNode, [$bOverwrite = False]) Creates an XML file with the given name and root.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLCreateRootChild($sNode) Create node directly under root.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLCreateRootNodeWAttr($sNode, $avAttr, $avVal,[$sData=""]) Create a child node under root node with attributes.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLDeleteAttr($sXPath, $sAttrib) Delete attribute for specified XPath(Requires: #include <_XMLDomWrapper.au3>)
        _XMLDeleteAttrNode($sXPath, $sAttrib) Delete attribute node for specified XPath(Requires: #include <_XMLDomWrapper.au3>)
        _XMLDeleteNode($sXPath) Delete specified XPath node.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLError($sError = "") Sets or Gets XML error message generated by XML functions.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLFileOpen($sXMLFile)Creates an instance of an XML file.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLGetAllAttrib($sXPath, [$sQuery = ""]) Get all XML Field(s) attributes based on XPath input from root node.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLGetAttrib($sXPath, $sAttrib, $sQuery = "") Get XML attribute based on XPath input from root node.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLGetField($sPath) Get XML Field(s) based on XPath input from root node.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLSetAttrib($sPath, $sAttrib, $sValue = "") Set XML Field(s) attributes based on XPath input from root node.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLUpdateField_XMLUpdateField($sXPath, $sData) Update existing node(s) based on XPath specs.(Requires: #include <_XMLDomWrapper.au3>)
        _XMLSelectNodes($sXPath) Selects XML Node(s) based on XPath input from root node. (Requires: #include <_XMLDomWrapper.au3>)
#ce

sxd 发表于 2010-6-2 14:26:41

fileopen基本上只是创建 Msxml2.DOMDocument.x.0对象来处理xml文件
当然最好也close一下
$objDoc = 0

xtanxin 发表于 2010-6-7 08:58:28

$objDoc = 0

赋值0,就相当于CLOSE了????
一般的数据操作都有查找,XML这个函数里面没有....我自己的水平写查找定位,路径,还是很有难度的.
页: [1]
查看完整版本: 奇怪,AU3的UDF:_XMLDomWrapper 有open,没有close?版主给解惑一下