Returns the unique XML elements included in an XML document.

fxml_getUniqueElements(xmlflat.df)

Arguments

xmlflat.df

A flat XML dataframe created with fxml_importXMLFlat.

Value

A vector with all the names of the elements included in the XML document xmlflat.df. Every tag is only returned once, even if it occurs multiple times in the document. The return vector is empty (NULL) if no elements exist.

See also

Examples

# Load example file with population data from United Nations Statistics Division # and create flat dataframe example <- system.file("worldpopulation.xml", package="flatxml") xml.dataframe <- fxml_importXMLFlat(example) # Identify the unique XML elements fxml_getUniqueElements(xml.dataframe)
#> [1] "ROOT" "data" "record" "field" "footnotes" "footnote"