/// <summary> /// Applies the <b>Conversion</b> to the indicated <see cref="XmlElement"/> /// instance to create a new <see cref="XmlDocument"/>. /// </summary> /// <param name="oldRoot">The <see cref="XmlElement"/> to be converted.</param> /// <param name="helper">A <see cref="IHelper"/> used to guide conversion.</param> /// <returns>A new <see cref="XmlDocument"/> containing the transformed data.</returns> public XmlDocument Convert(XmlElement oldRoot, HandCoded.Meta.IHelper helper) { XmlDocument target = TargetRelease.NewInstance("productInfoset"); // Transcribe each of the first level child elements foreach (XmlNode node in oldRoot.ChildNodes) { if (node.NodeType == XmlNodeType.Element) { Traverse(node, target, target.DocumentElement); } } return(target); }
/// <summary> /// Applies the <b>Conversion</b> to a <see cref="XmlDocument"/> instance /// to create a new <see cref="XmlDocument"/>. /// </summary> /// <param name="source">The <see cref="XmlDocument"/> to be converted.</param> /// <param name="helper">A <see cref="IHelper"/> used to guide conversion.</param> /// <returns>A new <see cref="XmlDocument"/> containing the transformed data.</returns> public override XmlDocument Convert(XmlDocument source, HandCoded.Meta.IHelper helper) { return(Convert(source.DocumentElement, helper)); }