XML

object XML extends XMLLoader[Elem]

The object XML provides constants, and functions to load and save XML elements. Use this when data binding is not desired, i.e. when XML is handled using Symbol nodes.

The object XML provides constants, and functions to load and save XML elements. Use this when data binding is not desired, i.e. when XML is handled using Symbol nodes.

Authors

Burak Emir

class Object
trait Matchable
class Any

Value members

Concrete methods

final def save(filename: String, node: Node, enc: String, xmlDecl: Boolean, doctype: DocType): Unit

Saves a node to a file with given filename using given encoding optionally with xmldecl and doctype declaration.

Saves a node to a file with given filename using given encoding optionally with xmldecl and doctype declaration.

Note: Before scala-xml 1.1.0, the default encoding was ISO-8859-1 (latin1). If your code depends on characters in non-ASCII latin1 range, specify ISO-8859-1 encoding explicitly.

Value Params
doctype

if not null, write doctype declaration

enc

encoding to use

filename

the filename

node

the xml node we want to write

xmlDecl

if true, write xml declaration

Returns an XMLLoader whose load* methods will use the supplied SAXParser.

Returns an XMLLoader whose load* methods will use the supplied SAXParser.

final def write(w: Writer, node: Node, enc: String, xmlDecl: Boolean, doctype: DocType, minimizeTags: Value): Unit

Writes the given node using writer, optionally with xml decl and doctype. It's the caller's responsibility to close the writer.

Writes the given node using writer, optionally with xml decl and doctype. It's the caller's responsibility to close the writer.

Value Params
doctype

if not null, write doctype declaration

enc

the string to be used in xmlDecl

node

the xml node we want to write

w

the writer

xmlDecl

if true, write xml declaration

Inherited methods

Inherited from
XMLLoader
def load(url: URL): Elem
Inherited from
XMLLoader
def load(source: InputSource): Elem
Inherited from
XMLLoader
def load(sysID: String): Elem
Inherited from
XMLLoader
def load(reader: Reader): Elem
Inherited from
XMLLoader
def load(is: InputStream): Elem

loads XML from given InputStream, Reader, sysID, InputSource, or URL.

loads XML from given InputStream, Reader, sysID, InputSource, or URL.

Inherited from
XMLLoader
def loadFile(name: String): Elem
Inherited from
XMLLoader
def loadFile(fd: FileDescriptor): Elem
Inherited from
XMLLoader
def loadFile(file: File): Elem

Loads XML from the given file, file descriptor, or filename.

Loads XML from the given file, file descriptor, or filename.

Inherited from
XMLLoader
def loadString(string: String): Elem

Loads XML from the given String.

Loads XML from the given String.

Inherited from
XMLLoader
def loadXML(source: InputSource, parser: SAXParser): Elem

Loads XML from the given InputSource, using the supplied parser. The methods available in scala.xml.XML use the XML parser in the JDK.

Loads XML from the given InputSource, using the supplied parser. The methods available in scala.xml.XML use the XML parser in the JDK.

Inherited from
XMLLoader
Inherited from
XMLLoader

Concrete fields

val encoding: String
val lang: String
val namespace: String
val preserve: String
val space: String
val xml: String
val xmlns: String