I'm exploring the XML processing in different technologies, we already have some codes, in Java we used SAX Parser, and in Spark we're spark-xml from the databricks. Now I'm trying to find out the pros and cons of each parser under certain conditions. I have found out that by using spark-xml, it can infer the schema for you while SAX parser doesn't, which is better for extracting the data in a very nested location.
I'm still a beginner, is there anyone can tell me more about the comparison between the Spark-xml and JAVA XML Parser? Any inputs will be very welcomed. THANKS!