Help Logstash XML Parsing to Xpath

That could work.

Still having the same issue.
Looks like the .xml file is not fully stored as @metadata?
Is there a way to keep xml files as it is as it cannot process entirely.

This is the error I'm having.

[2020-08-14T10:06:30,324][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2020-08-14T10:06:31,594][WARN ][logstash.filters.xml     ][main][5db384a5d4febe6da0346e111110199b81be900ee54139af298df60329b91b9a] Error parsing xml with XmlSimple {:source=>"message", :value=>"<NewData>\n  <Data ID=\"1234\" OtherID=\"48\" Description=\"This is a sample\" Type=\"Inside\" Instructions=\"Only Here\" OtherInstructions=\"NONE\">\n    <EntryDate>\n      <CCYY>2020</CCYY>\n      <Month>4</Month>\n      <Day>13</Day>\n    </EntryDate>\n    <OutDate>\n      <CCYY>2020</CCYY>\n      <Month>4</Month>\n      <Day>13</Day>\n    </OutDate>\n    <ClientConfig>\n      <ClientSetting name=\"Some_Value1\">true</ClientSetting>\n      <ClientSetting name=\"Some_Value2\">true</ClientSetting>\n      <ClientSetting name=\"Some_Value3\">true</ClientSetting>\n      <ClientSetting name=\"Some_Value4\">true</ClientSetting>\n      <ClientSetting name=\"Some_Value5\">true</ClientSetting>\n    </ClientConfig>\n\t</Data>\n<Document ID=\"1\" Type=\"-1\" Description=\"XXX\" Instructions=\"THIS\">\n    <Text>        Some text here \n </Text>\n  </Document>\n  <Document ID=\"2\" Type=\"-1\" Description=\"YYY\" Instructions=\"THIS\">\n    <Text>           \nSome Text here B         \n </Text>\n  </Document>", :exception=>#<REXML::ParseException: No close tag for /NewData
Line: 29
Position: 947
Last 80 unconsumed characters:
>, :backtrace=>["uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rexml/parsers/treeparser.rb:28:in `parse'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rexml/document.rb:288:in `build'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rexml/document.rb:45:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/xml-simple-1.1.5/lib/xmlsimple.rb:971:in `parse'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/xml-simple-1.1.5/lib/xmlsimple.rb:164:in `xml_in'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/xml-simple-1.1.5/lib/xmlsimple.rb:203:in `xml_in'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-filter-xml-4.1.0/lib/logstash/filters/xml.rb:195:in `filter'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:159:in `do_filter'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:178:in `block in multi_filter'", "org/jruby/RubyArray.java:1809:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:175:in `multi_filter'", "org/logstash/config/ir/compiler/AbstractFilterDelegatorExt.java:134:in `multi_filter'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:278:in `block in start_workers'"]}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.