Updating XML with ASP

Results 1 to 2 of 2

Thread: Updating XML with ASP

  1. #1
    Join Date
    Dec 1969

    Default Updating XML with ASP

    I am using the following function to update a field in XML<BR><BR>Function updateXMLField(strFieldName, strData2BInserted, strXMLFile)<BR><BR> Dim objDom<BR> Dim objRoot<BR> Dim objField<BR> Dim strFile<BR> <BR> strFile = strXMLFile<BR><BR> Set objDom = Server.CreateObject("Microsoft.XMLDOM")<BR> objDom.async = False<BR> strXMLFile = "c:inetpubwwwroot
    ewprojxml\" & strFile<BR> objDom.Load strXMLFile<BR><BR> Set objRoot = objDom.documentElement<BR><BR> Set objField = objRoot.selectSingleNode(strFieldName)<BR> <BR> Set objChild = objDom.createElement("pic")<BR> objField.appendChild objChild<BR><BR> objField.Text = strData2BInserted<BR><BR> objDom.save strXMLFile<BR> updateXMLField = True<BR><BR> End Function<BR><BR><BR>My question is, how would I need to modify this if I wanted to update the text that is in an attribute tag?<BR><BR>Example <BR>&#060;Test id="need to update here"&#062;Instead of here&#060;/test&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Updating XML with ASP

    use intellisense to find the appropriate method of the DOM object

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts