Try to improve the docs for xml

This commit is contained in:
Jordan Sissel 2013-01-02 15:36:51 -08:00
parent 6cf40c15fa
commit 444a19c9d9

View file

@ -10,11 +10,23 @@ class LogStash::Filters::Xml < LogStash::Filters::Base
# Config for xml to hash is:
#
# source => dest
# source_field => destination_field
#
# XML in the value of the source field will be expanded into a
# datastructure in the "dest" field. Note: if the "dest" field
# already exists, it will be overridden.
#
# For example, if you have the whole xml document in your @message field:
#
# filter {
# xml {
# "@message" => "doc"
# }
# }
#
# The above would parse the xml from @message and store the resulting
# document into the 'doc' field.
#
config /[A-Za-z0-9_-]+/, :validate => :string
# xpath will additionally select string values (.to_s on whatever is selected)