Description Usage Arguments Value Author(s) See Also Examples
Returns summary information on an XML element.
1 | fxml_getElementInfo(xmlflat.df, elemid)
|
xmlflat.df |
A flat XML dataframe created with |
elemid |
The ID of the XML element. The ID is the value of the |
A list with the following elements:
value
: The value of the XML element; return value of the fxml_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 the fxml_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 the fxml_getAttributesAll
function.
parent
: The parent of the XML element; return value of the fxml_getParent
function.
children
: The children of the XML element; return value of the fxml_getChildren
function.
siblings
: The siblings of the XML element; return value of the fxml_getSiblings
function.
Joachim Zuckarelli joachim@zuckarelli.de
fxml_getElement
, fxml_getValue
, fxml_getDepthLevel
, fxml_getAttribute
, fxml_getChildren
, fxml_getParent
, fxml_getSiblings
1 2 3 4 5 6 7 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.