DEV Community

Saranya Vijay
Saranya Vijay

Posted on

Convert dataframe with xml to json using pyspark

I have a big text file which has list of xml data separated by comma. I am using pyspark to read the text file, convert the data into pyspark dataframe.
Note i will have the xml data in single column with multiple rows of xml data. Then I wanted to convert xml to json and replace the xml with json data in dataframe. Any idea or help on how to achieve this will be really helpful. Thank you in advance.

Top comments (0)