in scala.xml
object Utility

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

  Utility functions for processing instances of bound and not bound XML classes, as well as escaping text nodes.

Constructor Summary
| `def` this

Def Summary
| `def` appendEscapedQuoted ( s : java.lang.String , sb : scala.runtime.compat.StringBuilder ) : scala.runtime.compat.StringBuilder Appends "s" and escapes and " i s with \"
| `def` appendQuoted ( s : java.lang.String , sb : scala.runtime.compat.StringBuilder ) : scala.runtime.compat.StringBuilder Appends "s" if 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
`final` | `def` escape ( text : java.lang.String , s : scala.runtime.compat.StringBuilder ) : scala.runtime.compat.StringBuilder
| `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
`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.runtime.compat.StringBuilder , s : java.lang.String ) : scala.runtime.compat.StringBuilder
| `def` systemLiteralToString ( s : java.lang.String ) : java.lang.String Returns a hashcode for the given constituents of a node
| `def` systemLiteralToString ( sb : scala.runtime.compat.StringBuilder , s : java.lang.String ) : scala.runtime.compat.StringBuilder
| `def` toXML ( n : scala.xml.Node ) : java.lang.String string representation of an XML node, with comments stripped the comments
| `def` toXML ( n : scala.xml.Node , stripComment : scala.Boolean ) : java.lang.String String representation of a Node. uses namespace mapping from `defaultPrefixes(n)`.
| `def` toXML ( x : scala.xml.Node , pscope : scala.xml.NamespaceBinding , sb : scala.runtime.compat.StringBuilder , stripComment : scala.Boolean ) : scala.Unit appends a tree to the given stringbuffer within given namespace scope.
| `def` view ( s : java.lang.String ) : scala.xml.Text

Constructor Detail

`def` this

Def Detail

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

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

param:
  s
param:
  sb

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

  Appends "s" if s does not contain ", 's' otherwise

param:
  s
param:
  sb

`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.

param:
  nodes

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

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

`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

param:
  uri
param:
  label
param:
  attribHashCode
param:
  children

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.runtime.compat.StringBuilder , s : java.lang.String ) : scala.runtime.compat.StringBuilder

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

  Returns a hashcode for the given constituents of a node

param:
  uri
param:
  label
param:
  attribs
param:
  children def hashCode(uri: String, label: String, attribs: scala.collection.mutable.HashMap[Pair[String,String],String], scpe: Int, children: Seq[Node]): Int = { 41 uri.hashCode() % 7 + label.hashCode() + attribs.toList.hashCode() + scpe + children.hashCode() }

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

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

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

see:
  "toXML(Node, Boolean)"

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

  String representation of a Node. uses namespace mapping from `defaultPrefixes(n)`.

param:
  n
param:
  stripComment
todo:
  define a way to escape literal characters to &xx; references

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

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

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

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