OS Manuals

/usr/bin/xmlwf

XML SAX Parser library written in C

From expat 2.10.0-r1 (os), captured 2026-11-05 by running xmlwf --help (exit 0). permalink

usage:
  /usr/bin/xmlwf [OPTIONS] [FILE ...]
  /usr/bin/xmlwf -h|--help
  /usr/bin/xmlwf -v|--version

xmlwf - Determines if an XML document is well-formed

positional arguments:
  FILE           file to process (default: STDIN)

input control arguments:
  -s             print an error if the document is not [s]tandalone
  -n             enable [n]amespace processing
  -p             enable processing of external DTDs and [p]arameter entities
  -x             enable processing of e[x]ternal entities
                 (CAREFUL! This makes xmlwf vulnerable to external entity attacks (XXE).)
  -e ENCODING    override any in-document [e]ncoding declaration
  -w             enable support for [W]indows code pages
  -r             disable memory-mapping and use [r]ead calls instead
  -g BYTES       buffer size to request per call pair to XML_[G]etBuffer and read (default: 8 KiB)
  -k             when processing multiple files, [k]eep processing after first file with error, and make the last error determine the exit code.

output control arguments:
  -d DIRECTORY   output [d]estination directory
  -c             write a [c]opy of input XML, not canonical XML
  -m             write [m]eta XML, not canonical XML
  -t             write no XML output for [t]iming of plain parsing
  -N             enable adding doctype and [n]otation declarations

amplification attack protection (e.g. billion laughs):
  NOTE: If you ever need to increase these values for non-attack payload, please file a bug report.

  -a FACTOR      set maximum tolerated [a]mplification factor (default: 100.0)
  -b BYTES       set number of output [b]ytes needed to activate (default: 8 MiB/64 MiB)

reparse deferral:
  -q             disable reparse deferral, and allow [q]uadratic parse runtime with large tokens

info arguments:
  -h, --help     show this [h]elp message and exit
  -v, --version  show program's [v]ersion number and exit

environment variables:
  EXPAT_ACCOUNTING_DEBUG=(0|1|2|3)
                 Control verbosity of accounting debugging (default: 0)
  EXPAT_ENTITY_DEBUG=(0|1|2)
                 Control verbosity of entity debugging (default: 0)
  EXPAT_ENTROPY_DEBUG=(0|1)
                 Control verbosity of entropy debugging (default: 0)
  EXPAT_MALLOC_DEBUG=(0|1|2)
                 Control verbosity of allocation tracker (default: 0)

exit status:
  0              the input files are well-formed and the output (if requested) was written successfully
  1              could not allocate data structures, signals a serious problem with execution environment
  2              one or more input files were not well-formed
  3              one or more output files could not be written
  4              command-line argument error

xmlwf of libexpat is software libre, licensed under the MIT license.
Please report bugs at https://github.com/libexpat/libexpat/issues -- thank you!
Options (19)
OptionDescriptionSource
-sprint an error if the document is not [s]tandalonehelp
-nenable [n]amespace processinghelp
-penable processing of external DTDs and [p]arameter entitieshelp
-xenable processing of e[x]ternal entities (CAREFUL! This makes xmlwf vulnerable to external entity attacks (XXE).)help
-e ENCODINGoverride any in-document [e]ncoding declarationhelp
-wenable support for [W]indows code pageshelp
-rdisable memory-mapping and use [r]ead calls insteadhelp
-g BYTESbuffer size to request per call pair to XML_[G]etBuffer and read (default: 8 KiB)help
-kwhen processing multiple files, [k]eep processing after first file with error, and make the last error determine the exit code.help
-d DIRECTORYoutput [d]estination directoryhelp
-cwrite a [c]opy of input XML, not canonical XMLhelp
-mwrite [m]eta XML, not canonical XMLhelp
-twrite no XML output for [t]iming of plain parsinghelp
-Nenable adding doctype and [n]otation declarationshelp
-a FACTORset maximum tolerated [a]mplification factor (default: 100.0)help
-b BYTESset number of output [b]ytes needed to activate (default: 8 MiB/64 MiB)help
-qdisable reparse deferral, and allow [q]uadratic parse runtime with large tokenshelp
-h, --helpshow this [h]elp message and exithelp
-v, --versionshow program's [v]ersion number and exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.