How do I move XML nodes?

Results 1 to 2 of 2

Thread: How do I move XML nodes?

  1. #1
    Join Date
    Dec 1969

    Default How do I move XML nodes?

    I am working on an ASP.NET application using C#.<BR><BR>In my XMLDocument, I have a node (that contains other nodes within) that I want to move to another location in the tree. How do move that node AND everything it contains?<BR><BR>Is there a MoveNode() method? All I see is a ReplaceChild() method. Will that do the job? The only way I could think of using the ReplaceChild() method is the create a new XMLNode at the new desired location, and then replacing that node with the old one. Then use RemoveChild() to delete the old node. Any better ways? Thanks.

  2. #2
    Join Date
    Dec 1969

    Default My only idea is..

    .. just about what you said:<BR><BR>Do a remove and then an append.

Posting Permissions

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