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 : java.lang.String
val lang : java.lang.String
val namespace : java.lang.String
val preserve : java.lang.String
val space : java.lang.String
val xml : java.lang.String
val xmlns : java.lang.String
Method Summary
final def load (is : java.io.InputStream) : Elem
loads XML from given InputStream, using XML parser in JDK.
final def load (sysID : java.lang.String) : Elem
loads XML from given sysID, using XML parser in JDK.
final def load (source : org.xml.sax.InputSource) : Elem
loads XML from a given input source, using XML parser in JDK.
final def load (reader : java.io.Reader) : Elem
loads XML from given Reader, using XML parser in JDK.
final def loadFile (file : java.io.File) : Elem
loads XML from given file, using XML parser in JDK.
final def loadFile (fileName : java.lang.String) : Elem
loads XML from given file, using XML parser in JDK.
final def loadFile (fileDesc : java.io.FileDescriptor) : Elem
loads XML from given file descriptor, using XML parser in JDK.
final def loadString (string : java.lang.String) : Elem
loads XML from a string, using XML parser in JDK.
final def save (filename : java.lang.String, node : Node) : Unit
Saves XML to filename with encoding ISO-8859-1 without xml-decl without doctype.
final def save (filename : java.lang.String, node : Node, enc : java.lang.String) : Unit
saves XML to filename with given encoding, without xml-decl without doctype.
final def saveFull (filename : java.lang.String, node : Node, enc : java.lang.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 saveFull (filename : java.lang.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 write (w : java.io.Writer, node : Node, enc : java.lang.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 : java.lang.String

val xmlns : java.lang.String

val namespace : java.lang.String

val preserve : java.lang.String

val space : java.lang.String

val lang : java.lang.String

val encoding : java.lang.String

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

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

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

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

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

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

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

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

final def save(filename : java.lang.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 : java.lang.String, node : Node, enc : java.lang.String) : Unit
saves XML to filename with given encoding, without xml-decl without doctype.
Parameters
filename - ...
node - ...
enc - ...

final def saveFull(filename : java.lang.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 : java.lang.String, node : Node, enc : java.lang.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 : java.io.Writer, node : Node, enc : java.lang.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