This one I thought would be simple, but i really just have 1 node I need to add to a node List.
So I have XmlNode xmlNode
. This node has all the information I need in it. I need to add this to XmlNodeList xmlnodeList
. I know this is dumb because it's not a list, but the following code has all the parts to handle a node list and would be a pain to unwind.
Also normally I would use XmlNodeList xmlnodeList = xmlNode.FirstChild.SelectNodes
however i need this entire node, not just the childnodes.
Thanks!
How about:
XmlNodeList xmlNodeList = xmlNode.SelectNodes(".");
See more on this question at Stackoverflow