Spark streaming with XML


#1

Does anyone have an example of parsing XML with spark streaming? I am able to get an XML stream from Kafka but not sure how to parse this. I see some tools online but things seem complicated for this operation.


#2

Kindly see below blog. See if it can help you.
https://mapr.com/blog/apache-spark-packages-xml-json/


#3

Thanks…
This is almost exactly what I started doing. I was going to convert the incoming XML into CSV and then process. JSON is another option. Either way conversion is the best way to deal with the problem.


#4

I am following this link … https://medium.com/@tennysusanto/use-databricks-spark-xml-to-parse-nested-xml-d7d7cf797c28