scxmlmerge

Merge the content of multiple XML files in SCML format.

Description

scxmlmerge reads all SeisComP elements from one or more XML files in SCML 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:

  • Config

  • DataAvailability

  • EventParameters

  • Inventory

  • QualityControl

  • Routing

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

There are alternative modules for processing inventory XML files:

  • scinv: Merge inventory XML files, extract inventory information.

  • invextr: Extract and filter 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
    

Module 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 Options

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

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

-s, --syslog

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

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Execute in debug mode. Equivalent to --verbosity=4 --console=1 .

--trace

Execute in trace mode. Equivalent to --verbosity=4 --console=1 --print-component=1 --print-context=1 .

--log-file arg

Use alternative log file.

Options

--event

Include Event Parameters.

--inventory

Include Inventory.

--config

Include Config.

--routing

Include Routing.

--quality

Include QualityControl.

--availability

Include DataAvailability.