scxmlmerge

Merge the content of multiple XML files in SC3ML format.

Description

scxmlmerge reads all SeisComP elements from one or more XML files in SC3ML format. It merges the content and prints the result to standard output. The input can contain and SeisComP element and the content can be filtered to print only some elements such as EventParameters. The output can be redirected into one single file and used by other applications.

The supported SeisComP elements are:

  • EventParameters

  • Inventory

  • Config

  • Routing

  • QualityControl

  • DataAvailability

By default all supported elements will be parsed and merged. Duplicates are removed. Use options to restrict the element types.

Note

Use also scinv for merging inventory XML files and for extracting inventory information.

Examples

  1. Merge the all SeisComP elements from 2 XML files into a single XML file:

    scxmlmerge file1.xml file2.xml > file.xml
    
  2. Merge the all EventParameters and all Config elements from 2 XML files into a single XML file. Other element types will be ignored:

    scxmlmerge -E -C file1.xml file2.xml > file.xml
    

Configuration

etc/defaults/global.cfg
etc/defaults/scxmlmerge.cfg
etc/global.cfg
etc/scxmlmerge.cfg
~/.seiscomp/global.cfg
~/.seiscomp/scxmlmerge.cfg

scxmlmerge inherits global options.

Command-line

scxmlmerge [options] inputFiles

Generic

-h, --help

show help message.

-V, --version

show version information

Verbosity

--verbosity arg

Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug

-v, --v

Increase verbosity level (may be repeated, eg. -vv)

-q, --quiet

Quiet mode: no logging output

--print-component arg

For each log entry print the component right after the log level. By default the component output is enabled for file output but disabled for console output.

--component arg

Limits the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging back end. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Debug mode: –verbosity=4 –console=1

--trace

Trace mode: –verbosity=4 –console=1 –print-component=1 –print-context=1

--log-file arg

Use alternative log file.

Options

--event E

Include Event Parameters

--inventory I

Include Inventory

--config C

Include Config

--routing R

Include Routing

--quality Q

Include QualityControl

--availability Y

Include DataAvailability