scala.xml

object XML

[source: scala/xml/XML.scala]

object XML
extends AnyRef
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.
Author
Burak Emir
Version
1.0, 25/04/2005
Value Summary
val encoding : String
val lang : String
val namespace : String
val preserve : String
val space : String
val xml : String
val xmlns : String
Method Summary
final def load (is : InputStream) : Elem
loads XML from given InputStream, using XML parser in JDK.
final def load (source : InputSource) : Elem
loads XML from a given input source, using XML parser in JDK.
final def load (sysID : String) : Elem
loads XML from given sysID, using XML parser in JDK.
final def load (reader : Reader) : Elem
loads XML from given Reader, using XML parser in JDK.
final def loadFile (file : File) : Elem
loads XML from given file, using XML parser in JDK.
final def loadFile (fileDesc : FileDescriptor) : Elem
loads XML from given file descriptor, using XML parser in JDK.
final def loadFile (fileName : String) : Elem
loads XML from given file, using XML parser in JDK.
final def loadString (string : String) : Elem
loads XML from a string, using XML parser in JDK.
final def save (filename : String, node : Node, enc : String) : Unit
saves XML to filename with given encoding, without xml-decl without doctype.
final def save (filename : String, node : Node) : Unit
Saves XML to filename with encoding ISO-8859-1 without xml-decl without doctype.
final def saveFull (filename : String, node : Node, xmlDecl : Boolean, doctype : DocType) : Unit
saves a node to a file with given filename using encoding iso-8859-1 optionally with xmldecl and doctype declaration.
final def saveFull (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.
final def write (w : Writer, node : Node, enc : String, xmlDecl : Boolean, doctype : DocType) : Unit
Writes the given node using writer, optionally with xml decl and doctype. It's the caller's responsibility to close the writer.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
val xml : String

val xmlns : String

val namespace : String

val preserve : String

val space : String

val lang : String

val encoding : String

Method Details
final def loadFile(file : File) : Elem
loads XML from given file, using XML parser in JDK.

final def loadFile(fileDesc : FileDescriptor) : Elem
loads XML from given file descriptor, using XML parser in JDK.
Parameters
fileDesc - ...
Returns
...

final def loadFile(fileName : String) : Elem
loads XML from given file, using XML parser in JDK.

final def load(is : InputStream) : Elem
loads XML from given InputStream, using XML parser in JDK.

final def load(reader : Reader) : Elem
loads XML from given Reader, using XML parser in JDK.

final def load(sysID : String) : Elem
loads XML from given sysID, using XML parser in JDK.

final def load(source : InputSource) : Elem
loads XML from a given input source, using XML parser in JDK.
Parameters
source - ...
Returns
...

final def loadString(string : String) : Elem
loads XML from a string, using XML parser in JDK.

final def save(filename : String, node : Node) : Unit
Saves XML to filename with encoding ISO-8859-1 without xml-decl without doctype.
Parameters
filename - ...
node - ...

final def save(filename : String, node : Node, enc : String) : Unit
saves XML to filename with given encoding, without xml-decl without doctype.
Parameters
filename - ...
node - ...
enc - ...

final def saveFull(filename : String, node : Node, xmlDecl : Boolean, doctype : DocType) : Unit
saves a node to a file with given filename using encoding iso-8859-1 optionally with xmldecl and doctype declaration.
Parameters
filename - the filename
node - the xml node we want to write
xmlDecl - if true, write xml declaration
doctype - if not null, write doctype declaration

final def saveFull(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.
Parameters
filename - the filename
node - the xml node we want to write
enc - encoding to use
xmlDecl - if true, write xml declaration
doctype - if not null, write doctype declaration

final def write(w : Writer, node : Node, enc : String, xmlDecl : Boolean, doctype : DocType) : Unit
Writes the given node using writer, optionally with xml decl and doctype. It's the caller's responsibility to close the writer.
Parameters
w - the writer
node - the xml node we want to write
enc - the string to be used in xmlDecl
xmlDecl - if true, write xml declaration
doctype - if not null, write doctype declaration