<% num = Trim(Request("Num")) 'Word limit value channelid = Trim(Request("ChannelID")) 'Channel ID sfield = Trim (Request("Field")) 'Field with character limit value that needs to be set
set objDom = server.CreateObject("MicroSoft.XMLDom") objDom.load(Server.MapPath("test .xml")) Set objNode = objDom.documentElement 'Node length newint=objNode.ChildNodes.length-1 for i=0 To newint 'Node id attribute set objarr=objNode.ChildNodes.item(i) if ( objarr.Attributes.item(1).Text = channelid) then if( objarr.ChildNodes.item(0).Attributes.item(1 ).Text = sfield ) then 'Directly locate the content of the attribute under the node ID objDom.getElementsByTagName("channel").item(i).childNodes.item(0).Attributes.item(2 ).Text = num exit for end if end if set objarr = Nothing next objDom.save(Server.MapPath("test.xml")) set objNode = Nothing Set objDom = Nothing %>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn