
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
	<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head><card id="MainCard" title="&#x6B22;&#x8FCE;&#x5149;&#x4E34;"><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a><br/>&nbsp;</p><p><b>&#x6807;&#x9898;&#x3A;</b> &#x61;&#x73;&#x70;&#x64CD;&#x7EB5;&#x78;&#x6D;&#x6C;&#x7C7B;</p><p><b>&#x4F5C;&#x8005;&#x3A;</b> &#x64;&#x6E;&#x61;&#x77;&#x6F;</p><p><b>&#x65E5;&#x671F;&#x3A;</b> &#x32;&#x30;&#x30;&#x37;&#x2D;&#x30;&#x31;&#x2D;&#x30;&#x33;&#x20;&#x30;&#x30;&#x3A;&#x31;&#x31;&#x20;&#x41;&#x4D;</p><p><b>&#x5206;&#x7C7B;&#x3A;</b> <a href="wap.asp?do=showLog&amp;cateID=5">&#x57;&#x65;&#x62;&#x7F16;&#x7A0B;</a></p><p><b>&#x5185;&#x5BB9;&#x3A;</b> &lt;%<br/>Class cls_xml<br/>private sfilename<br/>private sxmlfile<br/>private sobjxml<br/> <br/>property let filename(value)<br/>&#160;&#160;&#160;&#160;sfilename=value<br/>end property<br/> <br/>property get filename<br/>&#160;&#160;&#160;&#160;filename=sfilename<br/>end property<br/> <br/>property get objxml<br/>&#160;&#160;&#160;&#160;set objxml=sobjxml<br/>end property<br/> <br/>private sub class_initialize()<br/>&#160;&#160;&#160;&#160;sfilename=&#34;&#34;<br/>&#160;&#160;&#160;&#160;sxmlfile=&#34;&#34;<br/>&#160;&#160;&#160;&#160;sobjxml=null<br/>end sub<br/> <br/>private sub class_terminate()<br/>&#160;&#160;&#160;&#160;sobjxml.close<br/>&#160;&#160;&#160;&#160;set sobjxml=nothing<br/>end sub<br/> <br/>private sub cr&#101;atefile()&#39;&#x521B;&#x5EFA;xml&#x6587;&#x4EF6;<br/>&#160;&#160;&#160;&#160;Set oPI=sobjXML.cr&#101;ateProcessingInstruction(&#34;xml&#34;, &#34;version=&#34;&#34;1.0&#34;&#34; encoding=&#34;&#34;GB2312&#34;&#34;&#34;)<br/>&#160;&#160;&#160;&#160;sobjXML.ins&#101;rtBefore oPI,sobjXML.childNodes(0) <br/>&#160;&#160;&#160;&#160;savefile<br/>end sub<br/> <br/>public function loadfile()&#39;&#x8BFB;&#x53D6;xml&#x6587;&#x4EF6;<br/>&#160;&#160;&#160;&#160;sxmlfile=server.MapPath(sfilename)<br/>&#160;&#160;&#160;&#160;set sobjxml=server.Cr&#101;ateObject(&#34;msxml2.domdocument&#34;)<br/>&#160;&#160;&#160;&#160;sobjxml.load(sxmlfile)<br/>&#160;&#160;&#160;&#160;sobjxml.async=false<br/>&#160;&#160;&#160;&#160;if sobjxml.parseError.ErrorCode = 0 then<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;loadfile=true<br/>&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;cr&#101;atefile<br/>&#160;&#160;&#160;&#160;end if<br/>end function<br/> <br/>public sub addnode(byval parentnode,byval childnode,byval nodetext)&#39;&#x6DFB;&#x52A0;&#x8282;&#x70B9;<br/>&#160;&#160;&#160;&#160;if parentnode=&#34;&#34; then<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sobjxml.appendchild (sobjxml.cr&#101;ateElement(childnode))<br/>&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;set child=sobjxml.cr&#101;ateElement(childnode)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;child.text=nodetext<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sobjxml.sel&#101;ctsinglenode(parentnode).appendchild child<br/>&#160;&#160;&#160;&#160;end if<br/>end sub<br/> <br/>public sub addattr(byval parentnode,byval attrtype,byval attrname,byval attrtext)&#39;&#x6DFB;&#x52A0;&#x5C5E;&#x6027;<br/>&#160;&#160;&#160;&#160;set sattribute=sobjxml.cr&#101;ateNode(attrtype,attrname,&#34;&#34;)<br/>&#160;&#160;&#160;&#160;sattribute.text=attrtext<br/>&#160;&#160;&#160;&#160;if parentnode=&#34;&#34; then<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sobjxml.documentElement.setattributenode sattribute<br/>&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sobjxml.documentElement.sel&#101;ctsinglenode(parentnode).setattributenode sattribute<br/>&#160;&#160;&#160;&#160;end if<br/>&#160;&#160;&#160;&#160;savefile<br/>end sub<br/> <br/>private function getnode(byval nodepath,byval attrname,byval attrvalue)&#39;&#x83B7;&#x5F97;&#x8282;&#x70B9;&#x5BF9;&#x8C61;<br/>&#160;&#160;&#160;&#160;if attrname=&#34;&#34; then<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;set getnode=sobjxml.documentElement.sel&#101;ctsinglenode(nodepath)<br/>&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;set getnode=sobjxml.documentElement.sel&#101;ctsinglenode(&#34;//&#34;&amp;nodepath&amp;&#34;[@&#34;&amp;attrname&amp;&#34;=&#39;&#34;&amp;attrvalue&amp;&#34;&#39;]&#34;)<br/>&#160;&#160;&#160;&#160;end if<br/>end function<br/> <br/>public function getnodename(byval nodepath,byval attrname,byval attrvalue)&#39;&#x83B7;&#x5F97;&#x8282;&#x70B9;&#x540D;&#x79F0;<br/>&#160;&#160;&#160;&#160;getnodename=getnode(nodepath,attrname,attrvalue).nodename<br/>end function<br/> <br/>public function getnodevalue(byval nodepath,byval attrname,byval attrvalue)&#39;&#x83B7;&#x5F97;&#x8282;&#x70B9;&#x5185;&#x5BB9;<br/>&#160;&#160;&#160;&#160;getnodevalue=getnode(nodepath,attrname,attrvalue).text<br/>end function<br/>public sub modifynodevalue(byval nodepath,byval newtext,byval attrname,byval attrvalue)&#39;&#x4FEE;&#x6539;&#x8282;&#x70B9;&#x5185;&#x5BB9;<br/>&#160;&#160;&#160;&#160;set newnode=getnode(nodepath,attrname,attrvalue)<br/>&#160;&#160;&#160;&#160;newnode.text=newtext<br/>&#160;&#160;&#160;&#160;savefile<br/>end sub<br/> <br/>public function getnodeattrname(byval nodepath,byval attrname,byval attrname_,byval attrvalue_)&#39;&#x83B7;&#x5F97;&#x8282;&#x70B9;&#x5C5E;&#x6027;&#x540D;&#x79F0;<br/>&#160;&#160;&#160;&#160;getnodeattrname=getnode(nodepath,attrname_,attrvalue_).getattributenode(attrname).nodename<br/>end function<br/> <br/>public function getnodeattrvalue(byval nodepath,byval attrname,byval attrname_,byval attrvalue_)&#39;&#x83B7;&#x5F97;&#x8282;&#x70B9;&#x5C5E;&#x6027;&#x503C;<br/>&#160;&#160;&#160;&#160;getnodeattrvalue=getnode(nodepath,attrname_,attrvalue_).getattributenode(attrname).nodevalue<br/>end function<br/> <br/>public sub modifynodeattrvalue(byval nodepath,byval attrname,byval newtext,byval attrname_,byval attrvalue_)&#39;&#x4FEE;&#x6539;&#x8282;&#x70B9;&#x5C5E;&#x6027;&#x503C;<br/>&#160;&#160;&#160;&#160;set newattr=getnode(nodepath,attrname_,attrvalue_).getattributenode(attrname)<br/>&#160;&#160;&#160;&#160;newattr.text=newtext<br/>&#160;&#160;&#160;&#160;savefile<br/>end sub<br/> <br/>public sub delnode(byval parentnodepath,byval parentnodeattrname,byval parentnodeattrvalue,byval childnodepath,byval childnodeattrname,byval childnodeattrvalue)&#39;&#x5220;&#x9664;&#x8282;&#x70B9;<br/>&#160;&#160;&#160;&#160;if parentnodepath=&#34;&#34; then<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;set parentnode=sobjxml.documentElement<br/>&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;set parentnode=getnode(parentnodepath,parentnodeattrname,parentnodeattrvalue)<br/>&#160;&#160;&#160;&#160;end if<br/>&#160;&#160;&#160;&#160;set childnode=getnode(childnodepath,childnodeattrname,childnodeattrvalue)<br/>&#160;&#160;&#160;&#160;parentnode.removechild childnode<br/>&#160;&#160;&#160;&#160;savefile<br/>end sub<br/> <br/>public function getchildlength(byval nodename,byval attrname,byval attrvalue)&#39;&#x83B7;&#x5F97;&#x8282;&#x70B9;&#x957F;&#x5EA6;<br/>&#160;&#160;&#160;&#160;if nodename=&#34;&#34; then<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;getchildlength=sobjxml.documentElement.childnodes.length<br/>&#160;&#160;&#160;&#160;else<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;getchildlength=getnode(nodename,attrname,attrvalue).childnodes.length<br/>&#160;&#160;&#160;&#160;end if<br/>end function<br/> <br/>private sub savefile()&#39;&#x4FDD;&#x5B58;&#x6587;&#x4EF6;<br/>&#160;&#160;&#160;&#160;sobjxml.save(sxmlfile)<br/>end sub<br/>End class<br/>%&gt;</p><p> + <a href="#CommentCard">&#x67E5;&#x770B;&#x5F53;&#x524D;&#x65E5;&#x5FD7;&#x8BC4;&#x8BBA;</a> (1)</p><p>&nbsp;<br/><br/><a href="wap.asp?do=Login">&#x767B;&#x5F55;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.047&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="postCommentCard"><p><b>&#x6807;&#x9898;&#x3A;</b> <a href="#MainCard">&#x61;&#x73;&#x70;&#x64CD;&#x7EB5;&#x78;&#x6D;&#x6C;&#x7C7B;</a></p><p><br/>你没有权限发表评论</p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.047&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="CommentCard"><p>&#x6682;&#x65E0;&#x8BC4;&#x8BBA;</p><p><a href="#MainCard">&#x8FD4;&#x56DE;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.047&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card>
</wml>
