Skip to contents

Identify xml fields by name and show content.

Usage

x3p_show_xml(x3p, element, verbose = TRUE)

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.

verbose

boolean should warning be shown?

Value

list of exact field names and their contents

Examples

logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
x3p_show_xml(logo, "creator") # all fields containing the word "creator"
#> $Creator
#> [1] "Heike Hofmann, CSAFE"
#> 
x3p_show_xml(logo, "axis")
#> $Axes.CX.AxisType
#> [1] "I"
#> 
#> $Axes.CY.AxisType
#> [1] "I"
#> 
#> $Axes.CZ.AxisType
#> [1] "A"
#> 
x3p_show_xml(logo, "CZ.AxisType")
#> $Axes.CZ.AxisType
#> [1] "A"
#> 
# show all fields:
x3p_show_xml(logo, "*")
#> $sizeY
#> [1] 419
#> 
#> $sizeX
#> [1] 741
#> 
#> $incrementY
#> [1] 6.45e-07
#> 
#> $incrementX
#> [1] 6.45e-07
#> 
#> $Revision
#> [1] "ISO5436 - 2000"
#> 
#> $FeatureType
#> [1] "SUR"
#> 
#> $Axes.CX.AxisType
#> [1] "I"
#> 
#> $Axes.CX.DataType
#> [1] "D"
#> 
#> $Axes.CX.Increment
#> [1] "6.45000000000095e-07"
#> 
#> $Axes.CX.Offset
#> [1] "0"
#> 
#> $Axes.CY.AxisType
#> [1] "I"
#> 
#> $Axes.CY.DataType
#> [1] "D"
#> 
#> $Axes.CY.Increment
#> [1] "6.45e-07"
#> 
#> $Axes.CY.Offset
#> [1] "0"
#> 
#> $Axes.CZ.AxisType
#> [1] "A"
#> 
#> $Axes.CZ.DataType
#> [1] "D"
#> 
#> $Axes.CZ.Increment
#> [1] "1e-06"
#> 
#> $Axes.CZ.Offset
#> [1] "0"
#> 
#> $Date
#> [1] "2018-01-30T08:30:24"
#> 
#> $Creator
#> [1] "Heike Hofmann, CSAFE"
#> 
#> $Instrument.Manufacturer
#> [1] "N/A"
#> 
#> $Instrument.Model
#> [1] "N/A"
#> 
#> $Instrument.Serial
#> [1] "N/A"
#> 
#> $Instrument.Version
#> [1] "N/A"
#> 
#> $CalibrationDate
#> [1] "2018-01-30T08:30:24"
#> 
#> $ProbingSystem.Type
#> [1] "Software"
#> 
#> $ProbingSystem.Identification
#> [1] "N/A"
#> 
#> $Comment
#> [1] "image rendered from the CSAFE logo"
#> 
#> $MatrixDimension.SizeX
#> [1] "741"
#> 
#> $MatrixDimension.SizeY
#> [1] "419"
#> 
#> $MatrixDimension.SizeZ
#> [1] "1"
#> 
#> $DataLink.PointDataLink
#> [1] "bindata/data.bin"
#> 
#> $DataLink.MD5ChecksumPointData
#> [1] "021a34716ab08d418048c137dc74f92b"
#> 
# show first five fields
x3p_show_xml(logo, 1:5)
#> $sizeY
#> [1] 419
#> 
#> $sizeX
#> [1] 741
#> 
#> $incrementY
#> [1] 6.45e-07
#> 
#> $incrementX
#> [1] 6.45e-07
#> 
#> $Revision
#> [1] "ISO5436 - 2000"
#>