Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,11 @@ which you may make direct use of as follows:
import com.databricks.spark.xml.XmlInputFormat

// This will detect the tags including attributes
sc.hadoopConfiguration.set(XmlInputFormat.START_TAG_KEY, "<books>")
sc.hadoopConfiguration.set(XmlInputFormat.END_TAG_KEY, "</books>")
sc.hadoopConfiguration.set(XmlInputFormat.START_TAG_KEY, "<book>")
sc.hadoopConfiguration.set(XmlInputFormat.END_TAG_KEY, "</book>")
sc.hadoopConfiguration.set(XmlInputFormat.ENCODING_KEY, "utf-8")

val records = context.newAPIHadoopFile(
val records = sc.newAPIHadoopFile(
path,
classOf[XmlInputFormat],
classOf[LongWritable],
Expand Down