<?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 can we read XML files into Dataframes in Spark? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22312#M15268</link>
    <description />
    <pubDate>Fri, 18 Jun 2021 21:33:41 GMT</pubDate>
    <dc:creator>Srikanth_Gupta_</dc:creator>
    <dc:date>2021-06-18T21:33:41Z</dc:date>
    <item>
      <title>can we read XML files into Dataframes in Spark?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22312#M15268</link>
      <description />
      <pubDate>Fri, 18 Jun 2021 21:33:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22312#M15268</guid>
      <dc:creator>Srikanth_Gupta_</dc:creator>
      <dc:date>2021-06-18T21:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: can we read XML files into Dataframes in Spark?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22313#M15269</link>
      <description>&lt;P&gt;Yes, you can use the Spark XML library.  &lt;A href="https://github.com/databricks/spark-xml" target="test_blank"&gt;https://github.com/databricks/spark-xml&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 21:38:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22313#M15269</guid>
      <dc:creator>Ryan_Chynoweth</dc:creator>
      <dc:date>2021-06-18T21:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: can we read XML files into Dataframes in Spark?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22314#M15270</link>
      <description>&lt;P&gt;Yes we can read using below code snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;val df = spark.read .format("com.databricks.spark.xml").option("rowTag", "&amp;lt;message&amp;gt;") .load("sample.xml")&lt;/P&gt;&lt;P&gt;display(df)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rowTag is important to specify to read the actual content in XML&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please &lt;A href="https://kb.databricks.com/data/blob-data-in-xml.html" alt="https://kb.databricks.com/data/blob-data-in-xml.html" target="_blank"&gt;read&lt;/A&gt; for more details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 21:39:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22314#M15270</guid>
      <dc:creator>Srikanth_Gupta_</dc:creator>
      <dc:date>2021-06-18T21:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: can we read XML files into Dataframes in Spark?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22315#M15271</link>
      <description>&lt;P&gt;Yes of course, you can use the &lt;/P&gt;&lt;P&gt;OR use &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val df = spark.read
      .format("xml")
      .load("my_file.xml")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;More info on the spark-xml api &lt;A href="https://github.com/databricks/spark-xml" alt="https://github.com/databricks/spark-xml" target="_blank"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 21:39:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22315#M15271</guid>
      <dc:creator>Mooune_DBU</dc:creator>
      <dc:date>2021-06-18T21:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: can we read XML files into Dataframes in Spark?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22316#M15272</link>
      <description>&lt;P&gt;Note that you will need to install the spark-xml library to make this work: &lt;A href="https://github.com/databricks/spark-xml" target="test_blank"&gt;https://github.com/databricks/spark-xml&lt;/A&gt; For example you can create a Library in the workspace that references com.databricks:spark-xml_2.12:0.12.0 and then attach it to a cluster&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 10:08:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-we-read-xml-files-into-dataframes-in-spark/m-p/22316#M15272</guid>
      <dc:creator>sean_owen</dc:creator>
      <dc:date>2021-06-22T10:08:46Z</dc:date>
    </item>
  </channel>
</rss>

