fxml_getElementInfo {flatxml} | R Documentation |
Handling flat XML files
Description
Returns summary information on an XML element.
Usage
fxml_getElementInfo(xmlflat.df, elemid)
Arguments
xmlflat.df |
A flat XML dataframe created with |
elemid |
The ID of the XML element. The ID is the value of the |
Value
A list with the following elements:
-
value
: The value of the XML element; return value of thefxml_getValue
function. -
path
: A vector representing the path from the root element of the XML element document to the current element. Each XML element on the path is represented by a element of the vector. The vector elements are the names of the XML elements on the path. -
depth.level
: The depth level (hierarchy level) of the XML element; return value of thefxml_getDepthLevel
function. -
attributes
: A named vector with the attributes of the XML element (vector elements are the attributes' values, names of the vector elements are the attributes' names; return value of thefxml_getAttributesAll
function. -
parent
: The parent of the XML element; return value of thefxml_getParent
function. -
children
: The children of the XML element; return value of thefxml_getChildren
function. -
siblings
: The siblings of the XML element; return value of thefxml_getSiblings
function.
Author(s)
Joachim Zuckarelli joachim@zuckarelli.de
See Also
fxml_getElement
, fxml_getValue
, fxml_getDepthLevel
, fxml_getAttribute
, fxml_getChildren
, fxml_getParent
, fxml_getSiblings
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)
# Get all relevant information on the XML element with ID 4 (xml.dataframe$elemid. == 4)
fxml_getElementInfo(xml.dataframe, 4)