write_naaccr_xml: Write records to a NAACCR-formatted XML file

View source: R/write_naaccr.R

write_naaccr_xmlR Documentation

Write records to a NAACCR-formatted XML file

Description

Write records to a NAACCR-formatted XML file

Usage

write_naaccr_xml(
  records,
  con,
  version = NULL,
  format = NULL,
  base_dictionary = NULL,
  user_dictionary = NULL,
  encoding = "UTF-8"
)

Arguments

records

A naaccr_record object.

con

Either a character string naming a file or a connection open for writing.

version

An integer specifying the NAACCR format version for parsing the records. Use this or format, not both. If both version and format are NULL (the default), the most recent version is used.

format

A record_format object for writing the records.

base_dictionary

URI for the dictionary defining the NAACCR data items. If this is NULL and either version is not NULL or format is one of the standard NAACCR formats, then the URI from NAACCR's website for that version's dictionary will be used.

user_dictionary

URI for the dictionary defining the user-specified data items. If NULL (default), it won't be included in the XML.

encoding

String specifying the character encoding for the output file.

Value

Invisibly returns the XMLInternalDocument object which was written to con.


naaccr documentation built on Nov. 23, 2022, 5:06 p.m.