updating xml tree from asp

Results 1 to 2 of 2

Thread: updating xml tree from asp

  1. #1
    Join Date
    Dec 1969

    Default updating xml tree from asp

    I have created a web page that displays data to a user from an asp page that transforms an xsl stylesheet with an xml document.<BR>The data is displayed in a form. I am trying to update the xml document from the asp page and am having difficulty. I have figured out how to add a node and to add text but I can&#039;t seem to change the text of an element.<BR><BR>the xml looks like this<BR>&#060;User&#062;<BR> &#060;Name&#062;asdf&#060;/Name&#062;<BR> &#060;Weight&#062;134&#060;/Weight&#062;<BR> &#060;Gender&#062;Female&#060;/Gender&#062;<BR>&#060;User&#062;<BR>in my asp I have sName = request("Name") etc. where Name is the value in the name field of the form<BR><BR>I want to update the Name node in the xml<BR>I have created an object of the xml with the "load" method and have<BR>Set root = oXml.documentElement<BR>Set currNode = root.childNode.item(0)<BR><BR>Now I want change the data in the current node to the data with the new data from the form elements and then save it with the "save" method.<BR><BR>Is there something like<BR>root.childNode.item(0).insertData(sName)<B R><BR>Someone help me please!!!!<BR><BR><BR><BR>

  2. #2
    zhivago Guest

    Default RE: updating xml tree from asp

    try something like<BR><BR>set oNode = root.selectSingleNode("Name")<BR>oNode.text = "foof"

Posting Permissions

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