Font size:      

j4copy XML file format

XML file format

j4copy uses an XML file format to store its data (i.e. groups and items). A sample XML file is given in <J4COPY_HOME>/sample. Related DTD is j4copy.dtd (in <J4COPY_HOME>/conf). Information found in this file is described in the concepts page.

j4copy GUI provides easy-to-use editing functions for XML files.

File specifications

File specifications (filespecs) define which files are to be copied in a given item. They are defined using includes and excludes. Includes must be present and valid, while excludes may be omitted. The order is always "includes" test, and if successful, "excludes" test. If both included and not excluded, an entry (file or directory) is processed during copy.

A flag exists also to ignore case while testing an entry for includes/excludes. This flag is useful in OS like MS-Windows, since lower and upper cases in filenames are often mixed (for instance Windows directory contains both .EXE and .exe files).

The following rules are applied in filespecs:

  • directories are marked with a trailing '/' (slash); for instance: CVS/
  • Unix shell-like wildcards are supported: '*' and '?'
  • patterns are separated by ',' (comma); for instance: *.java,mydir/,test???.dat
  • in fact (for advanced users), filespecs are interpreted as a regex pattern, with (for ease of use) the following mappings:
    • '*' becomes '.*'
    • '?' becomes '.'
    • '.' becomes '\.'
    • ',' becomes '|'
    mixing regex and wildcards is thus possible but should be used with extreme care.