Need Help with Parsing XML, Renaming Nodes

Author Message
alexj33

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 10/28/2008
  • Status: offline
Need Help with Parsing XML, Renaming Nodes Tuesday, October 28, 2008 6:58 AM (permalink)
0
Can it really be this hard?

In VBscript, I parse some XML with Msxml2.DOMDocument like so.


Set oXMLDocument = Server.CreateObject("Msxml2.DOMDocument")
oXMLDocument.loadXML(someXML)


set oSomeNode = oXMLDocument.selectSingleNode("//nodename")

Now I want rename this node. Apparently, the renameNode() function is only available in DOM level 3.

How do I rename one node?

Please tell me that Microsoft thought of this.




 
#1
    TNO

    • Total Posts : 2094
    • Scores: 36
    • Reward points : 0
    • Joined: 12/18/2004
    • Location: Earth
    • Status: offline
    RE: Need Help with Parsing XML, Renaming Nodes Thursday, October 30, 2008 1:35 PM (permalink)
    0
    create a new node, clone the contents of the first node into the second, then replace the original with the new one you created
    To iterate is human, to recurse divine. -- L. Peter Deutsch
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9