Advanced Analytics with Spark by Sandy Ryza Uri Laserson Sean Owen & Josh Wills

Advanced Analytics with Spark by Sandy Ryza Uri Laserson Sean Owen & Josh Wills

Author:Sandy Ryza, Uri Laserson, Sean Owen & Josh Wills
Language: eng
Format: epub, pdf
Publisher: O'Reilly Media, Inc.
Published: 2015-03-26T16:00:00+00:00


Parsing XML Documents with Scala’s XML Library

Scala has an interesting history with XML. Since version 1.2, Scala has treated XML as a first-class data type. This means that the following code is syntactically valid:

import scala.xml._ val cit = <MedlineCitation>data</MedlineCitation>

This support for XML literals has always been somewhat unusual among major programming languages, especially as other serialization formats such as JSON have come into widespread use. In 2012, Martin Odersky published the following note to the Scala language mailing list:

[XML literals] Seemed a great idea at the time, now it sticks out like a sore thumb. I believe with the new string interpolation scheme we will be able to put all of XML processing in the libraries, which should be a big win.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.