As you can see, this kind of thing is really hard to get 100% right. Most of the time the worst problem is that the very last character in the file is not a newline.
Another possibility is to use a python script preprocessor to read a whole file and append a minified XML string to another file that filebeat will tail.
A partial solution. python - Remove whitespaces in XML string - Stack Overflow
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.