Hi,
I've got the following piece of code that's causing me a bit of a problem
XmlDocument doc = new XmlDocument ();
XmlNode rootNode = doc.CreateNode (XmlNodeType.Element, "usersettings",
null);
User user = new User (userid);
XmlNode rolesNode = user.GetRoles ();
rootNode.AppendChild (rolesNode);
:
:
The last line (rootNode.AppendChild (rolesNode)) throws an exception "The
node to be inserted is from a different document context." How can I work
around this? The code above is from a Web-service that collects various
information regarding a user from different sources each of which returns an
XmlNode. The web-service adds each XmlNode to a "root" node and then returns
this "root" node to the client.
Eirik M.