Skip to content

Commit

Permalink
Docs: fil in notes on parser_options configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Jan 22, 2020
1 parent 1aedffb commit 12151c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 4.1.0
- Feat: added parser_options for more control over XML parsing [#68](https://github.com/logstash-plugins/logstash-filter-xml/pull/68)

## 4.0.7
- Fixed creation of empty arrays when xpath failed [#59](https://github.com/logstash-plugins/logstash-filter-xml/pull/59)

Expand Down
14 changes: 14 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
| <<plugins-{type}s-{plugin}-force_array>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-force_content>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-namespaces>> |<<hash,hash>>|No
| <<plugins-{type}s-{plugin}-parser_options>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-remove_namespaces>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-source>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-store_xml>> |<<boolean,boolean>>|No
Expand Down Expand Up @@ -87,6 +88,19 @@ filter {
}
}

[id="plugins-{type}s-{plugin}-parser_options"]
===== `parser_options`

* Value type is <<string,string>>

Setting XML parser options allows for more control of the parsing process.
By default the parser is non strict and thus accepts some invalid content.
Multiple options are separated by a comma (e.g. `'strict,no_warning'`),
currently supported options are:

- _strict_ - forces the parser to fail early when content is not valid xml
- _no_warning_ - allows to parse content when there are only warnings
- _no_error_ - allows to parse content on non fatal parser errors

[id="plugins-{type}s-{plugin}-remove_namespaces"]
===== `remove_namespaces`
Expand Down
2 changes: 1 addition & 1 deletion logstash-filter-xml.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-filter-xml'
s.version = '4.0.7'
s.version = '4.1.0'
s.licenses = ['Apache License (2.0)']
s.summary = "Parses XML into fields"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down

0 comments on commit 12151c6

Please sign in to comment.