Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2021 02:39 PM
Yes we can read using below code snippet
val df = spark.read .format("com.databricks.spark.xml").option("rowTag", "<message>") .load("sample.xml")
display(df)
rowTag is important to specify to read the actual content in XML
please read for more details