Your technology certification is waiting. Enroll in Cloud Class ®
public class Sample
public static void Main()
//Create the XmlDocument.
XmlDocument doc = new XmlDocument();
doc.LoadXml("<book genre='novel' ISBN='1-861001-57-5'>" +
"<title>Pride And Prejudice</title>" +
//Create a deep clone. The cloned node
//includes the child node.
XmlDocument deep = (XmlDocument) doc.CloneNode(true);
//Create a shallow clone. The cloned node does not
//include the child node.
XmlDocument shallow = (XmlDocument) doc.CloneNode(false);
Console.WriteLine(shallow.Name + shallow.OuterXml);
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.