Concatenate Files and MarcXml

The Concatenate Files utility joins files together. It was designed to join MARC files, but will also join text files, or anything else really (though some files are not meant to be concatenated, and concatenating files of different types will usually produce bizarre results).

MarcXml presents a bit of a challenge for concatenation, since each MarcXml file begins with some headers. Here is an example from an LC produced file:

<?xml version=“1.0” encoding=“UTF-8”?>
<collection xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=“http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
xmlns=“http://www.loc.gov/MARC21/slim”>

The problem is that if several files, each with these headers, are concatenated, the result will be a broken Xml file.

Beginning with version 2.32, Concatenate Files will support Xml file concatenation, with the following provisions.

XML concatenation does not validate the XML structure in any way, apart from the brief checks listed above. It is more or less a raw concatenation.

If you are concatenating XML files from different vendors/sources, you should run some sample concatenations first before proceeding with a major project. Keep in mind that if you concatenate two xml files from different sources, the program will keep the collection tags from the first file, and dump those from the second file. In some, cases then, it may be important which xml file appears first in the list of files to be concatenated (you can change this easily by dragging and dropping in the list).