I have an xml Response for a SOAP Request in Scala with Spark which i want to convert into a Dataframe so i can append it to a hive table.
I have tried databricks.spark.xml but it can only load xml files directly. I am unable to find a way to load an xml variable ( Elem)
Input:
<XML>
<hol_cal date="2019-01-01" Desc="New Year's Day"/>
<hol_cal date="2019-04-19" Desc="Good Friday"/>
<hol_cal date="2019-04-22" Desc="Easter Monday"/>
...
...
...
</XML>
Output: Data Frame:
|Date |Desc | |2019-01-01|New Year's Day| |2019-04-19|Good Friday | ....