in scala.xml
object Utility

`object` Utility
  `extends` java.lang.Object
  `with` scala.xml.parsing.TokenTests
  `with` scala.ScalaObject

  The `Utility` object provides utility functions for processing instances of bound and not bound XML classes, as well as escaping text nodes.

Author:
  Burak Emir

Constructor Summary
| `def` this

Def Summary
| `def` appendEscapedQuoted (s: java.lang.String, sb: scala.compat.StringBuilder) : scala.compat.StringBuilder Appends "s" and escapes and " i s with \"
| `def` appendQuoted (s: java.lang.String, sb: scala.compat.StringBuilder) : scala.compat.StringBuilder Appends "s" if string `s` does not contain ", 's' otherwise.
| `def` checkAttributeValue (value: java.lang.String) : java.lang.String Returns `null` if the value is a correct attribute value, error message if it isn't.
| `def` collectNamespaces (n: scala.xml.Node, set: scala.collection.mutable.Set[java.lang.String]) : scala.Unit Adds all namespaces in node to set.
| `def` collectNamespaces (nodes: scala.Seq[scala.xml.Node]) : scala.collection.mutable.Set[java.lang.String] Returns a set of all namespaces used in a sequence of nodes and all their descendants, including the empty namespaces.
`final` | `def` escape (text: java.lang.String) : java.lang.String Escapes the characters < > & and " from string.
`final` | `def` escape (text: java.lang.String, s: scala.compat.StringBuilder) : scala.compat.StringBuilder Appends escaped string to `s`.
| `def` getName (s: java.lang.String, index: scala.Int) : java.lang.String
| `def` hashCode (pre: java.lang.String, label: java.lang.String, attribHashCode: scala.Int, scpeHash: scala.Int, children: scala.Seq[scala.xml.Node]) : scala.Int Returns a hashcode for the given constituents of a node
| `def` parseAttributeValue (value: java.lang.String) : scala.Seq[scala.xml.Node] new
| `def` parseCharRef (ch: scala.Function0[scala.Char], nextch: scala.Function0[scala.Unit], reportSyntaxError: scala.Function1[java.lang.String, scala.Unit]) : java.lang.String
         CharRef ::= "&#" '0'..'9' {'0'..'9'} ";"
                   | "&#x" '0'..'9'|'A'..'F'|'a'..'f' { hexdigit } ";"
see [66]
`final` | `def` prefix (name: java.lang.String) : scala.Option[java.lang.String] Returns prefix of qualified name if any.
| `def` publicLiteralToString (s: java.lang.String) : java.lang.String
| `def` publicLiteralToString (sb: scala.compat.StringBuilder, s: java.lang.String) : scala.compat.StringBuilder
| `def` sequenceToXML (children: scala.Seq[scala.xml.Node], pscope: scala.xml.NamespaceBinding, sb: scala.compat.StringBuilder, stripComment: scala.Boolean) : scala.Unit
| `def` systemLiteralToString (s: java.lang.String) : java.lang.String
| `def` systemLiteralToString (sb: scala.compat.StringBuilder, s: java.lang.String) : scala.compat.StringBuilder
| `def` toXML (n: scala.xml.Node) : java.lang.String Returs the string representation of an XML node, with comments stripped the comments.
| `def` toXML (n: scala.xml.Node, stripComment: scala.Boolean) : java.lang.String Return the string representation of a Node. uses namespace mapping from `defaultPrefixes(n)`.
| `def` toXML (x: scala.xml.Node, pscope: scala.xml.NamespaceBinding, sb: scala.compat.StringBuilder, stripComment: scala.Boolean) : scala.Unit Appends a tree to the given stringbuffer within given namespace scope.
`final` | `def` unescape (ref: java.lang.String, s: scala.compat.StringBuilder) : scala.compat.StringBuilder Appends unescaped string to `s`, amp becomes & lt becomes < etc..
| `def` view (s: java.lang.String) : scala.xml.Text

Constructor Detail

`def` this

Def Detail

`def` appendEscapedQuoted (s: java.lang.String, sb: scala.compat.StringBuilder): scala.compat.StringBuilder

  Appends "s" and escapes and " i s with \"

Parameters:
  `s -` ...
Parameters:
  `sb -` ...
Returns:
  ...

`def` appendQuoted (s: java.lang.String, sb: scala.compat.StringBuilder): scala.compat.StringBuilder

  Appends "s" if string `s` does not contain ", 's' otherwise.

Parameters:
  `s -` ...
Parameters:
  `sb -` ...
Returns:
  ...

`def` checkAttributeValue (value: java.lang.String): java.lang.String

  Returns `null` if the value is a correct attribute value, error message if it isn't.

Parameters:
  `value -` ...
Returns:
  ...

`def` collectNamespaces (n: scala.xml.Node, set: scala.collection.mutable.Set[java.lang.String]): scala.Unit

  Adds all namespaces in node to set.

Parameters:
  `n -` ...
Parameters:
  `set -` ...

`def` collectNamespaces (nodes: scala.Seq[scala.xml.Node]): scala.collection.mutable.Set[java.lang.String]

  Returns a set of all namespaces used in a sequence of nodes and all their descendants, including the empty namespaces.

Parameters:
  `nodes -` ...
Returns:
  ...

`final def` escape (text: java.lang.String): java.lang.String

  Escapes the characters < > & and " from string.

Parameters:
  `text -` ...
Returns:
  ...

`final def` escape (text: java.lang.String, s: scala.compat.StringBuilder): scala.compat.StringBuilder

  Appends escaped string to `s`.

Parameters:
  `text -` ...
Parameters:
  `s -` ...
Returns:
  ...

`def` getName (s: java.lang.String, index: scala.Int): java.lang.String

Parameters:
  `s -` ...
Parameters:
  `index -` ...
Returns:
  ...

`def` hashCode (pre: java.lang.String, label: java.lang.String, attribHashCode: scala.Int, scpeHash: scala.Int, children: scala.Seq[scala.xml.Node]): scala.Int

  Returns a hashcode for the given constituents of a node

Parameters:
  `uri -`
Parameters:
  `label -`
Parameters:
  `attribHashCode -`
Parameters:
  `children -`

`def` parseAttributeValue (value: java.lang.String): scala.Seq[scala.xml.Node]

  new

Parameters:
  `value -` ...
Returns:
  ...

`def` parseCharRef (ch: scala.Function0[scala.Char], nextch: scala.Function0[scala.Unit], reportSyntaxError: scala.Function1[java.lang.String, scala.Unit]): java.lang.String

           CharRef ::= "&#" '0'..'9' {'0'..'9'} ";"
                     | "&#x" '0'..'9'|'A'..'F'|'a'..'f' { hexdigit } ";"

  see [66]

Parameters:
  `ch -` ...
Parameters:
  `nextch -` ...
Parameters:
  `reportSyntaxError -` ...
Returns:
  ...

`final def` prefix (name: java.lang.String): scala.Option[java.lang.String]

  Returns prefix of qualified name if any.

Parameters:
  `name -` ...
Returns:
  ...

`def` publicLiteralToString (s: java.lang.String): java.lang.String

Parameters:
  `s -` ...
Returns:
  ...

`def` publicLiteralToString (sb: scala.compat.StringBuilder, s: java.lang.String): scala.compat.StringBuilder

Parameters:
  `sb -` ...
Parameters:
  `s -` ...
Returns:
  ...

`def` sequenceToXML (children: scala.Seq[scala.xml.Node], pscope: scala.xml.NamespaceBinding, sb: scala.compat.StringBuilder, stripComment: scala.Boolean): scala.Unit

Parameters:
  `children -` ...
Parameters:
  `pscope -` ...
Parameters:
  `sb -` ...
Parameters:
  `stripComment -` ...

`def` systemLiteralToString (s: java.lang.String): java.lang.String

Parameters:
  `s -` ...
Returns:
  ...

`def` systemLiteralToString (sb: scala.compat.StringBuilder, s: java.lang.String): scala.compat.StringBuilder

Parameters:
  `sb -` ...
Parameters:
  `s -` ...
Returns:
  ...

`def` toXML (n: scala.xml.Node): java.lang.String

  Returs the string representation of an XML node, with comments stripped the comments.

Parameters:
  `n -` the XML node
Returns:
  the string representation of node `n`.
See Also:
  "toXML(Node, Boolean)"

`def` toXML (n: scala.xml.Node, stripComment: scala.Boolean): java.lang.String

  Return the string representation of a Node. uses namespace mapping from `defaultPrefixes(n)`.

Parameters:
  `n -` the XML node
Parameters:
  `stripComment -` ...
Returns:
  ...
Todo:
  define a way to escape literal characters to &xx; references

`def` toXML (x: scala.xml.Node, pscope: scala.xml.NamespaceBinding, sb: scala.compat.StringBuilder, stripComment: scala.Boolean): scala.Unit

  Appends a tree to the given stringbuffer within given namespace scope.

Parameters:
  `n -` the node
Parameters:
  `pscope -` the parent scope
Parameters:
  `sb -` stringbuffer to append to
Parameters:
  `stripComment -` if true, strip comments

`final def` unescape (ref: java.lang.String, s: scala.compat.StringBuilder): scala.compat.StringBuilder

  Appends unescaped string to `s`, amp becomes & lt becomes < etc..

Parameters:
  `ref -` ...
Parameters:
  `s -` ...
Returns:
  `null` if `ref` was not a predefined entity.

`def` view (s: java.lang.String): scala.xml.Text