Skip to contents

Add a child fragment to an existing xml_fragment. The child fragment can be a named frag element in which case the name is used as the tag name, an unnamed element in which case the element is added as a text node. This functionality is equivalent with the / operator.

Usage

add_child_fragment(x, ..., .frag = frag(...))

Arguments

x

an xml_fragment() object

...

nest named elements and characters to include in the fragment (see example)

.frag

an xml_fragment to add as a child, overrides the ... argument

Value

the original xml_fragment() with the child added.

See also