Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 198839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:58:19+00:00 2026-05-11T16:58:19+00:00

Basicly what I need is to be able to rename an XmlElement (which is

  • 0

Basicly what I need is to be able to rename an XmlElement (which is not possible in .NET afaik).

Is there a way to ImportNode an XmlElement and rename that new XmlElement?

XmlElement oldElm;
XmlDocument doc;
XmlElement newElm = (XmlElement) doc.ImportNode(oldElm, true);
newElm.Rename(“newElmName”, “urn:newElmNameSpace”);

or something similar…

What I want to avoid is to write a loop where I import the childnodes into a newly created element…

Is this possible (in .NET)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:58:19+00:00Added an answer on May 11, 2026 at 4:58 pm

    I don’t think that this is possible in .NET at the moment using the XmlDocument. From what I know and have been able to research the only way to achieve a re-naming of an element is to create a new element and move the origional elements children under this element.

    Here is an example showing you how to re-name an element using the W3C DOM (XmlDocument) model by moving the children.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basicly need to be able to restrict the items that can be appended
I basicly need to load the whole XML file, add a new line with
I need to be able to access my database, which in it's own isn't
I need to develop an app that is using multithreading. Basicly, I have a
I have one question about Yii framework, and I need your help. Basicly, I
I wondering is there an equivalent of this feature from play framework http://www.playframework.org/documentation/2.0/JavaAsync Basicly
Basicly, what I need for the program to do is to act a as
I was wondering if there was any way to make tables in html to
I need to ask you guys/gals out there about a concept of website development
basicly i need my page to respond to left and right arrow keys. so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.