Skip to main content

strip_root_and_build_xml

Function strip_root_and_build_xml 

Source
pub fn strip_root_and_build_xml(
    parsed: &XmlElement,
    element_to_strip: &str,
) -> Option<String>
Expand description

Strip the given element and build a new XML string.

  • If it is the root element: its inner content becomes the new document (with ?xml preserved).
  • If it is a child of the root (e.g. programProcesses under LoyaltyProgramSetup): unwrap it so its inner content becomes the direct children of the root; the root element is kept.