1. Command line
Prev | Appendix A. Command line options | Next

## 1. Command line

    xxe [advanced_option]*
        [ [ -read ] file_or_URL_to_be_opened ]* [ -compare ]
        | -last
        | -new config template save_file_or_URL
        | -new save_file_or_URL

Options:

`file_or_URL_to_be_opened`

  Open specified document in normal read/write mode.

`-read` `file_or_URL_to_be_opened`

  Open specified document in read-only mode.

`-compare`

  This option must be specified just after at least two `file_or_URL_to_be_opened` arguments. This option automates the comparison of two revisions of the same initial document for which change detection has been activated. (Background information about the compare revisions feature: the Tools → Changes submenu, the Compare tool.)

  Examples:

      xxe doc.xml~ doc.xml -compare
      xxe -read ../old_docs/art23.xml art23.xml -compare
      xxe art23.xml -read ../old_docs/art23.xml -compare

`-last`

  Forces XXE to reopen the last document opened during the preceding editing session. Note that this option cannot be used when one or more `file_or_URL_to_be_opened`s have been specified.

  See also the "Automatically reopen last opened document" option for a handy alternative.

`-new` `category` `template` `save_file_or_URL`

  Command-line equivalent to using File → New.

  category

    Specifies the (case-insensitive) name of the category of the document template. A category consists in one or more segments separated by character `'/'`.

    By default, the category of a document template is the name of the configuration in which this template has been specified.

    Example 1: actual category : `XHTML/1.0` or `xhtml/1.0` (category "`XHTML/1.0`" includes all the templates specified in configurations "`XHTML Strict`" and "`XHTML Transitional`").

    Example 2: actual category : `XHTML/5.0` or `xhtml/5.0` (category "`XHTML/5.0`" includes all the templates specified in configuration "`XHTML 5.0`").

    Example 3: category which is in fact a configuration name: `DocBook` or `docbook` (the document templates of DocBook 4 are not sorted into categories).

    Example 4: category which is in fact a configuration name: "`Simplified DocBook`" (the document templates of Simplified DocBook are not sorted into categories).

  template

    Specifies the (case-insensitive, possibly localized) name of a document template. Example: "`Seite` (Streng)" ("`Page (Strict)`" in German).

    Alternatively, you can specify the basename (without any extension) of the file containing the document template. Doing this should work whatever your locale. Example: "`page_strict`".

    Use "`-`" to specify the first available document template. This option is mainly useful with configurations having a single document template such as "`Slides`".

  save_file_or_URL

    Specifies the filename or URL of the newly created document. Note that specifying such filename does not create the corresponding save file. You'll have to use File → Save or File → Save As to actually save the newly created document.

    Use "`-`" to let XMLmind XML Editor choose this filename for you (as it does it when you use File → New).

  Examples:

  - Create a new `Slides` [38] presentation. The filename of the new presentation is `MyPresentation.xml`. This file will be found in the current working directory.

        -new slides - MyPresentation.xml

  - Create a new XHTML 5.0 page and let XXE choose the filename for you:

        -new XHTML/5.0 "XHTML Seite" -

    or:

        -new xhtml/5.0 page -

    or:

        -new xhtml/5.0 - -

  - Create a new DocBook section in file `sections/s4.xml` (relative to the current working directory):

        -new docbook section sections/s4.xml

`-new` `save_file_or_URL`

  A convenient alternative to "`-new` `category` `template` `save_file_or_URL`". It creates a new document using

  - last interactively selected (that is, using File → New) document template having the same file extension as `save_file_or_URL` if any;

  - otherwise, first declared document template having the same file extension as `save_file_or_URL`.

  Example:

      -new page.html

Advanced options:

`-putpref` `key` `value`

  Adds or replace preference specified by `key`/`value` to the set of the user's preferences.

  The set of the user's preferences is normally modified using the Preferences dialog box.

  For example, in the case of the Encoding option, the preference key is `encoding`.

      xxe -putpref encoding Windows-1252

  The reference of all preference keys is found below.

`-putprefs` `property_file_or_URL`

  Similar to `-putpref` except that several key/value pairs may be read from specified property file. Example:

      xxe -putprefs /etc/xxe/preferences.properties

`-delpref` `key`

  Removes preference specified by `key` from the set of the user's preferences.

`-auth` credentials

  This option can be used to specify authentication credentials for a given server. This allows to connect to the specified server without interactively asking the user to enter a username and a password.

  String `credentials` consists in 6 fields: `host`, `port`, `prompt`, `scheme`, `username`, `password`, in that order, separated by a newline character (`'\n'`). Fields `host`, `port`, `prompt`, `scheme` can be left empty, which means: match any. The UTF-8 bytes of the string are then encoded in base-64.

  Command-line utility "`java -cp xxe.jar com.xmlmind.netutil.SimpleAuthenticatorModule`" allows to generate such encoded string. Example: encode string "`\n\nDocument Store\n\nvictoria\nsecret`":

      /opt/xxe/bin$ java -cp xxe.jar com.xmlmind.netutil.SimpleAuthenticatorModule \
      victoria secret - "Document Store"
      CgpEb2N1bWVudCBTdG9yZQoKanZpY3RvcmlhCnNlY3JldA==

      /opt/xxe/bin$ xxe -auth CgpEb2N1bWVudCBTdG9yZQoKanZpY3RvcmlhCnNlY3JldA== \
      http://www.acme.com/docstore/push_up.xml &

`-open` `file_or_URL_to_be_opened`, `-print` `file_or_URL_to_be_opened`

  First `file_or_URL_to_be_opened` may be preceded by `-open` or `-print`, which are ignored. This may be useful when XXE is started by Java™ Web Start. Example: "`javaws http://www.acme.com/xxe/xxe.jnlp -open /docs/doc.xml`".

[38] Requires installing the corresponding add-on.

Prev | Up | Next
Appendix A. Command line options | Home | 2. Preference keys