Skip to content
biswanaths edited this page Aug 23, 2015 · 16 revisions

####Welcome to the scala-xml, community driven xml library for scala !

#####For Users

  • Introduction

  • Getting started

    Scala-xml lets you type in XML as a literal anywhere that an expression is valid. Simply type a start tag and then continue writing XML content. The compile will go into an XML-input mode and will read content as XML until it sees the end tag matching the start tag you began with:

    val book = <book id="b20234">Magic of scala-xml</book>

    The result of this expression is of type Elem, meaning it is an XML element with a label ("book").

    Some other important XML classes are:

    • Class Node is the abstract superclass of all XML node classes.
    • Class Text is a node holding just text. For example, the "stuff" part of stuff is of class Text.
    • Class NodeSeq holds a sequence of nodes. Many methods in the XML library process NodeSeqs in places you might expect them to process individual Nodes. You can still use such methods with individual nodes, however, since Node extends from NodeSeq. This may sound weird, but it works out well for XML. You can think of an individual Node as a one-element NodeSeq.

#####For Contributors

  • Introduction
  • Getting started
  • Coding guidelines
  • Review Tips
Clone this wiki locally