Learn R Programming

x3ptools (version 0.0.4)

x3p_show_xml: Show xml elements from meta information in x3p object

Description

Identify xml fields by name and show content.

Usage

x3p_show_xml(x3p, element)

Value

list of exact field names and their contents

Arguments

x3p

x3p object

element

character or integer (vector). In case of character, name of xml field in the meta file. Note that element can contain regular expressions, e.g. "*" returns all meta fields. In case of integer, element is used as an index vector for the meta fields.

Examples

Run this code
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
x3p_show_xml(logo, "creator") # all fields containing the word "creator"
x3p_show_xml(logo, "axis")
x3p_show_xml(logo, "CZ.AxisType")
# show all fields:
x3p_show_xml(logo, "*")
# show first five fields
x3p_show_xml(logo, 1:5)

Run the code above in your browser using DataLab