cmp_xml_files: Run the XML diff utility on two XML files

View source: R/xml.R

cmp_xml_filesR Documentation

Run the XML diff utility on two XML files

Description

Comparing two XML files turns out to be more easily done in python, so this function runs the python comparison code. The standard mode checks the return code and returns TRUE if the files are equivalent, or FALSE if they are not. If the files are not equivalent, the differences found will *not* be written to the console; you have to use raw mode if you want to get that information.

Usage

cmp_xml_files(fleft, fright, raw = FALSE)

Arguments

fleft

The first file to compare

fright

The second file to compare

raw

Flag: if true run in raw mode

Details

The 'raw' mode returns the stdout generated by the comparison code as a string. If the files are equivalent this return value will be empty (i.e., a zero-length character vector, not an empty string). If not, then it will contain the diagnostic output. In either case the string returned will have a 'status' attribute giving the return code.


JGCRI/gcamdata documentation built on March 21, 2023, 2:19 a.m.