XML结构:
新建一个mask_list节点,一个procedure节点,将上面的mask_list和procedure节点的所有子孙节点添加到新建的mask_list和procedure节点
XmlElement mask_list = xmlDoc.CreateElement("mask_list");XmlElement procedure = xmlDoc.CreateElement("procedure");XmlNode xn_mask_list = xmlDoc.DocumentElement.SelectSingleNode("/xwsp/lab_list/lab[name/text()='111']/mask_list");XmlNode xn_procedure = xmlDoc.DocumentElement.SelectSingleNode("/xwsp/lab_list/lab[name/text()='111']/procedure");if (xn_mask_list != null){ mask_list.InnerXml = xn_mask_list.InnerXml;}if (xn_procedure != null){ procedure.InnerXml = xn_procedure.InnerXml;}