以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  asp操作XML的问题,两天搞不定,请大家帮帮忙,急!!!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=63125)


--  作者:douhaogege
--  发布时间:5/27/2008 4:21:00 PM

--  asp操作XML的问题,两天搞不定,请大家帮帮忙,急!!!
一个Xml操作类的一个方法只能调用一次,不知道 那儿的错?
--  作者:douhaogege
--  发布时间:5/27/2008 4:27:00 PM

--  
Function UpdateNodeText(byVal ElementOBJ,byVal NewElementText,byVal IsCDATA)
    Dim TextSection

    set UpdateNodeText=nothing
    If not fopen Then Exit Function
    
    Set ElementOBJ=ChildNode(XmlDom,ElementOBJ,false)
    If ElementOBJ Is Nothing Then Exit Function

    If IsCDATA=true Then
      set TextSection=XmlDom.createCDATASection(NewElementText)
      If ElementOBJ.firstchild Is Nothing Then
        ElementOBJ.appendChild TextSection
      ElseIf LCase(ElementOBJ.firstchild.nodeTypeString)="cdatasection" Then
        ElementOBJ.replaceChild TextSection,ElementOBJ.firstchild
      End If
    Else
      ElementOBJ.Text=NewElementText
    End If
    
    set fNode=ElementOBJ
    Set UpdateNodeText=ElementOBJ
  End Function


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
62.500ms