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.

If the "Enable the 'File|Folder' Submenu" feature has been enabled, file_or_URL_to_be_opened may also specify the location of a folder or a Zip archive (of any kind: .zip, .jar, .epub, .docx, .xlsx, .odt, etc). When this is the case, a "Browse Files" tool is opened to allow browsing the contents of this folder or Zip archive.

Examples:

xxe doc.xml
xxe .
xxe C:\Users\john
xxe zipped/docsrc.zip
xxe report.docx
-read file_or_URL_to_be_opened

Open specified document in read-only mode.

Ignored when file_or_URL_to_be_opened specifies the location of a folder or a Zip archive.

-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 the comparison of revisions has been enabled. (Background information about the compare revisions feature: the ToolsRevisions 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_openeds have been specified.

See also the "Automatically reopen last opened documents" option for a more comprehensive alternative.

-new save_file_or_URL

Creates a new document having specified filename or URL.

Note that this option does not create the corresponding save file. You'll still have to use FileSave or FileSave As to actually save the newly created document. However, when this option is used, FileSave or FileSave As will display a file chooser dialog box properly initialized using save_file_or_URL.

The document template used to create the new document is determined as follows:

  • If the file extension of save_file_or_URL is used only for a single document template (e.g. ".ditaval") then this document template is used to create the new document.

  • Otherwise, if the file extension of save_file_or_URL does not correspond to any template (e.g. ".docb") or corresponds to several templates (e.g. ".xml") then the FileNew dialog box is displayed to let the user choose a document template.

Examples:

-new ../common/filter.ditaval

-new doc.xml

Advanced options:

-putpref key value

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

If value starts with "<?xml?>", then this prefix is removed and XML character entities are unescaped in value. This allows to easily specify preference values containing “unusual characters”. For example -putpref MyKey "<?xml?>Line 1&#xA;Line 2" adds preference key MyKey with a value equals to "Line 1" and "Line 2" separated by a newline character ("&#xA;").

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 XXE_install_dir/bin/authvalue 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 &

Command-line utility authvalue is auto-documented. Type authvalue, then press Enter to display a short documentation explaining how to use this utility.

-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".