this is a part of my XML file with all the necessary depth:
<?xml version="1.0" encoding="UTF-8" ?>
<Taxonomy>
<TaxonomyNode>
<Entity>BUSINESS</Entity>
<Description>Business News</Description>
<TaxonomyNode>
<Entity>COS</Entity>
<Description>Company News</Description>
<TaxonomyNode>
<Entity>ANA</Entity>
<Description>Analyst Ratings & Commentary</Description>
<TaxonomyNode>
<Entity>ANABUY</Entity>
<Description>Analyst Ratings - Buys</Description>
<TaxonomyNode>
<Entity>ANABEVT</Entity>
<Description>Analyst Ratings Events, Announcements - Buys</Description>
</TaxonomyNode>
<TaxonomyNode>
<Entity>BMRANABUY</Entity>
<Description>Analyst Ratings - Buys</Description>
<TaxonomyNode>
<Entity>ANRACC</Entity>
<Description>ANR Accumulate</Description>
</TaxonomyNode>
</TaxonomyNode>
</TaxonomyNode>
</TaxonomyNode>
</TaxonomyNode>
</TaxonomyNode>
</Taxonomy>
as you can see we have multiple rows with the same name, and reading this with spark with the conventional spark.read.format("com.databricks.spark.xml").option("rowTag","TaxonomyNode").load(completeXMLFilePath) is not working, it is returning me a dataframe looking like this:

and that has a schema like this:

I would be thankful if anybody has an idea on how to make this thing work