Skip to contents

Copy an XML section from one reach to another

Usage

copy_xml_section(
  source_reach,
  source_section,
  target_reach,
  target_section,
  xp = xml2::read_xml(cfg$project$path),
  write_xml = TRUE,
  cfg
)

Arguments

source_reach

integer the reach number of the source section

source_section

integer the section number of the source reach

target_reach

integer the reach number of the target section

target_section

integer the section number of the target reach

xp

A xml_document of the XML project file. Default is the one in the configuration

write_xml

logical if TRUE, the XML file is saved after modification (Needs that cfg is provided)

cfg

a config object. Configuration to use. See loadConfig for details

Value

Nothing. Use for side effect on the XML project file.