locked
How to rename node in Windows.Data.Xml.Dom

    Question

  • I do not seem to see the renameNode method in any of the classes? Was this really forgotten?
    Tuesday, July 15, 2014 8:05 PM

Answers

  • That might be James, but I am not talking about DomParser but 

    Windows.Data.Xml.Dom.

    And the RFC for XML has a renameNode() method. So where is that in the WinRT XML API?

    edit: just found http://social.msdn.microsoft.com/Forums/en-US/bd61735f-3fef-4e37-b133-744c7e0123fe/how-to-rename-a-node?forum=xmlandnetfx and it seems there is no official renameNode anywhere.

    I wonder why?

    • Edited by pkursawe Wednesday, July 16, 2014 7:31 AM found solution
    • Marked as answer by pkursawe Wednesday, July 16, 2014 7:31 AM
    Wednesday, July 16, 2014 7:27 AM

All replies

  • Hi pkursawe,

    As I know Node name can not be changed according to Document Object Model: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247

    But you can always replace a node by ReplaceChild.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, July 16, 2014 2:15 AM
    Moderator
  • That might be James, but I am not talking about DomParser but 

    Windows.Data.Xml.Dom.

    And the RFC for XML has a renameNode() method. So where is that in the WinRT XML API?

    edit: just found http://social.msdn.microsoft.com/Forums/en-US/bd61735f-3fef-4e37-b133-744c7e0123fe/how-to-rename-a-node?forum=xmlandnetfx and it seems there is no official renameNode anywhere.

    I wonder why?

    • Edited by pkursawe Wednesday, July 16, 2014 7:31 AM found solution
    • Marked as answer by pkursawe Wednesday, July 16, 2014 7:31 AM
    Wednesday, July 16, 2014 7:27 AM