I am working on an xml that has the structure like below.
I am trying to access tag 2.1.1 and its child attributes. So, I have given root tag as tag2 and rowtag as tag 2.1.1. The below code is returning null. If I apply the same logic to tag1, it is working fine. What am i missing here?
<root>
<tag1>
<tag 1.1>a</tag 1.1>
<tag 1.2>b</tag 1.2>
</tag1>
<tag2>
<tag 2.1>
<tag 2.1.1>
<---Multiple tags--->
</tag 2.1.1>
</tag 2.1>
<tag 2.2>
<---multiple tags---->
</tag 2.2>
</tag2>
</root>
df = sqlContext.read.format('com.databricks.spark.xml')\
.options(rootTag='tag2',rowTag='tag 2.1.1') \
.load('s3://xmlpath')