Learn R Programming

tab2xml (version 1.1.0)

remove_empty_nodes: Remove Empty XML Nodes Recursively

Description

This function traverses an XML node and removes any empty child nodes. A node is considered empty if it has no children, no text content, and no attributes.

Usage

remove_empty_nodes(node)

Value

The function modifies the XML structure in place and does not return a value.

Arguments

node

An XML node of class `xml_node` from the `xml2` package.