Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some additional rendering options from xmlbuilder to the documentation #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,13 @@ Possible options are:

* `rootName` (default `root` or the root key name): root element name to be used in case
`explicitRoot` is `false` or to override the root element name.
* `renderOpts` (default `{ 'pretty': true, 'indent': ' ', 'newline': '\n' }`):
* `renderOpts` (default `{ 'pretty': true, 'indent': ' ', 'newline': '\n', 'allowEmpty': false, 'spacebeforeslash': '' }`):
Rendering options for xmlbuilder-js.
* pretty: prettify generated XML
* indent: whitespace for indentation (only when pretty)
* newline: newline char (only when pretty)
* allowEmpty: allow empty tags like <root></root> instead of self-closing them like <root/> (only when pretty)
* spacebeforeslash: add the given space character(s) into self-closed tags like <root /> (only when pretty)
* `xmldec` (default `{ 'version': '1.0', 'encoding': 'UTF-8', 'standalone': true }`:
XML declaration attributes.
* `xmldec.version` A version number string, e.g. 1.0
Expand Down