@Retired_mod Hi! I apologise for the late reply! 😅 I'm using the 14.3 LTS (includes Apache Spark 3.5.0, Scala 2.12) version of the cluster. I use the python programming language. When I read other files that do not have empty tags (i.e. a tag that does not have an opening tag and a closing tag, but has a "merged" tag) like in my first post the tag "ItemId", the code works marvellously, but when it encounters an empty tag the reading stops. If the document consists of "normal" tags that have an opening and closing tag, the reading works fine! 🙂
And it's marvellous and makes it very easy to work with files in databricks, but empty tags don't work for me 😅
df = spark.read.format('xml').options(rowTag='Item').load(test_file_location)
df.display()
Example for normal XML
<people>
<person>
<age born="1990-02-24">25</age>
</person>
<person>
<age born="1985-01-01">30</age>
</person>
<person>
<age born="1980-01-01">30</age>
</person>
</people>
Example of empty tag
<people>
<person>
<age_t born="1990-02-24"/>
<age born="1990-02-24">25</age>
</person>
<person>
<age_t born="1985-01-01"/>
<age born="1985-01-01">30</age>
</person>
<person>
<age_t born="1980-01-01"/>
<age born="1980-01-01">30</age>
</person>
</people>