Any one follow the following links before about xml

I just keep having problem on importing import com.databricks.spark.xml._


enter image description here

My databricks version

enter image description here

Actually I also want to know how to install the package

$SPARK_HOME/bin/spark-shell --packages com.databricks:spark-xml_2.12:0.5.0

2 Answers

Venky On

Use this dependency in Android Studio:

compile group: 'com.databricks', name: 'spark-xml_2.12', version: '0.5.0'

For further assistance, follow this link:

Ritesh On

You can install package/library by using import library option available in databricks homepage.


Here choose maven option and give maven coordinates or you have the privilege to search package as well


enter image description here

After this you need to attach the library to your cluster by navigating Clusters>Libraries. Now you can directly use this library as below without importing it.

df ='com.databricks.spark.xml').options(rowTag='book').load(' /FileStore/tables/sample.xml')