<?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 Re: Converting column of XML strings to column of Jsons in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/converting-column-of-xml-strings-to-column-of-jsons/m-p/35781#M25971</link>
    <description>&lt;P&gt;To convert a column of XML strings to a column of JSON in PySpark, you can use the `from_json` function along with the `xmltodict` library. However, instead of using a UDF with `withColumn`, you can use the `select` function to transform the column.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jun 2023 19:30:25 GMT</pubDate>
    <dc:creator>DessertKid</dc:creator>
    <dc:date>2023-06-28T19:30:25Z</dc:date>
    <item>
      <title>Converting column of XML strings to column of Jsons</title>
      <link>https://community.databricks.com/t5/data-engineering/converting-column-of-xml-strings-to-column-of-jsons/m-p/35629#M25932</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to convert column of XML strings to column of Json in PySpark., using withcolumn and xmltodict method as UDF, is giving Json with '=' instead of ':' in the dictionary. Please let me know if there is any alternative for this.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 05:35:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/converting-column-of-xml-strings-to-column-of-jsons/m-p/35629#M25932</guid>
      <dc:creator>Ankith</dc:creator>
      <dc:date>2023-06-28T05:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Converting column of XML strings to column of Jsons</title>
      <link>https://community.databricks.com/t5/data-engineering/converting-column-of-xml-strings-to-column-of-jsons/m-p/35781#M25971</link>
      <description>&lt;P&gt;To convert a column of XML strings to a column of JSON in PySpark, you can use the `from_json` function along with the `xmltodict` library. However, instead of using a UDF with `withColumn`, you can use the `select` function to transform the column.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 19:30:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/converting-column-of-xml-strings-to-column-of-jsons/m-p/35781#M25971</guid>
      <dc:creator>DessertKid</dc:creator>
      <dc:date>2023-06-28T19:30:25Z</dc:date>
    </item>
  </channel>
</rss>

