x3p_show_xml: Show xml elements from meta information in x3p object

Description Usage Arguments Value Examples

View source: R/modify_xml.R

Description

Identify xml fields by name and show content.

Usage

1
x3p_show_xml(x3p, element)

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.

Value

list of exact field names and their contents

Examples

1
2
3
4
5
6
7
8
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)

x3ptools documentation built on Nov. 27, 2021, 1:06 a.m.