<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic reading XML file of mutiple row Tags in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123301#M47000</link>
    <description>&lt;P&gt;I have multiple xml files in a folder. i am reading into dataframe in a databricks cell. It has one rootTag and multiple rowTags. can i read into single spark dataframe (pyspark) for all the rowTags. Any reference for this or approach would greatly appreciated.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jun 2025 13:42:36 GMT</pubDate>
    <dc:creator>shubham7</dc:creator>
    <dc:date>2025-06-30T13:42:36Z</dc:date>
    <item>
      <title>reading XML file of mutiple row Tags</title>
      <link>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123301#M47000</link>
      <description>&lt;P&gt;I have multiple xml files in a folder. i am reading into dataframe in a databricks cell. It has one rootTag and multiple rowTags. can i read into single spark dataframe (pyspark) for all the rowTags. Any reference for this or approach would greatly appreciated.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 13:42:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123301#M47000</guid>
      <dc:creator>shubham7</dc:creator>
      <dc:date>2025-06-30T13:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: reading XML file of mutiple row Tags</title>
      <link>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123307#M47001</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/127443"&gt;@shubham7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I don't know if I understood your requirements correctly, but maybe something like this could work for you.&lt;BR /&gt;I have 2 xml files in my volume, each with following structure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;root&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;id&amp;gt;2&amp;lt;/id&amp;gt;
    &amp;lt;value&amp;gt;foo2&amp;lt;/value&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;id&amp;gt;3&amp;lt;/id&amp;gt;
    &amp;lt;value&amp;gt;bar3&amp;lt;/value&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/root&amp;gt;


&amp;lt;root&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;
    &amp;lt;value&amp;gt;foo&amp;lt;/value&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;id&amp;gt;2&amp;lt;/id&amp;gt;
    &amp;lt;value&amp;gt;bar&amp;lt;/value&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/root&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1751292958941.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17856iBCD8F82E6BBA39F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1751292958941.png" alt="szymon_dybczak_0-1751292958941.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To load those file into single dataframe I've used following code:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;df = (
    spark.read.format("xml") 
    .option("rootTag", "root") 
    .option("rowTag", "row") 
    .load("/Volumes/workspace/default/my_volume/*.xml")
) &lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Jun 2025 14:17:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123307#M47001</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-06-30T14:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: reading XML file of mutiple row Tags</title>
      <link>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123332#M47002</link>
      <description>&lt;P&gt;you are correct, but i have N number of different rowTags. how to read in a dataframe.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 16:51:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/reading-xml-file-of-mutiple-row-tags/m-p/123332#M47002</guid>
      <dc:creator>shubham7</dc:creator>
      <dc:date>2025-06-30T16:51:35Z</dc:date>
    </item>
  </channel>
</rss>

