This chapter discusses the functionality to read, process, and use XML schema within R. The primary goal is to be able to programmatically generate R classes and code to work with XML documents. Recall from Section 2.7 that an XML schema describes the structure, content and data types for XML documents in a particular XML vocabulary, grammar or format (e.g., PMML or KML). The information in the schema can be turned into S4 class definitions and R functions for reading and generating XML in R for that XML vocabulary. We can use these S4 classes to represent data that appear in the XML documents as R objects corresponding to the schema. This means we can both read XML into objects of these classes and also generate XML by serializing these R objects to XML. The key idea is that these classes and methods for reading and writing XML are generated programmatically. The XMLSchema package provides code that generates code for a given schema. R users do not need to interact directly with the contents of a schema, but can benefit from them to create structured R code and data.
[1]
Eric van der Vlist,et al.
XML Schema
,
2002
.
[2]
D. Lipman,et al.
National Center for Biotechnology Information
,
2019,
Springer Reference Medizin.
[3]
Paul Murrell,et al.
Export 'grid' Graphics as SVG
,
2015
.
[4]
English Only.
Economic Commission for Europe
,
2012
.
[5]
Jyrki Wallenius,et al.
Multiple Criteria Decision Making: From Early History to the 21st Century
,
2011
.
[6]
Priscilla Walmsley,et al.
Definitive XML Schema
,
2001
.