scala.xml

PrettyPrinter

class PrettyPrinter extends AnyRef

Class for pretty printing. After instantiating, you can use the format() and formatNode() methods to convert XML to a formatted string. The class can be reused to pretty print any number of XML nodes.

Version

1.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PrettyPrinter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PrettyPrinter(width: Int, step: Int)

    width

    the width to fit the output into

    step

    indentation

Type Members

  1. case class Box(col: Int, s: String) extends Item with Product with Serializable

  2. class BrokenException extends java.lang.Exception

  3. class Item extends AnyRef

  4. case class Para(s: String) extends Item with Product with Serializable

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Break extends Item with Product with Serializable

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def childrenAreLeaves(n: Node): Boolean

    Attributes
    protected
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. var cur: Int

    Attributes
    protected
  11. def cut(s: String, ind: Int): List[Item]

    Try to cut at whitespace.

    Try to cut at whitespace.

    Attributes
    protected
  12. def endTag(n: Node): String

    Attributes
    protected
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def fits(test: String): Boolean

    Attributes
    protected
  17. def format(n: Node, pscope: NamespaceBinding = null): String

    Returns a formatted string containing well-formed XML with given namespace to prefix mapping.

    Returns a formatted string containing well-formed XML with given namespace to prefix mapping.

    n

    the node to be serialized

    pscope

    the namespace to prefix mapping

    returns

    the formatted string

  18. def format(n: Node, pscope: NamespaceBinding, sb: StringBuilder): Unit

  19. def format(n: Node, sb: StringBuilder): Unit

    Appends a formatted string containing well-formed XML with given namespace to prefix mapping to the given string buffer.

    Appends a formatted string containing well-formed XML with given namespace to prefix mapping to the given string buffer.

    n

    the node to be serialized

    sb

    the stringbuffer to append to

  20. def formatNodes(nodes: Seq[Node], pscope: NamespaceBinding, sb: StringBuilder): Unit

    Appends a formatted string containing well-formed XML with the given namespace to prefix mapping to the given stringbuffer.

    Appends a formatted string containing well-formed XML with the given namespace to prefix mapping to the given stringbuffer.

    nodes

    the nodes to be serialized

    pscope

    the namespace to prefix mapping

    sb

    the string buffer to which to append to

  21. def formatNodes(nodes: Seq[Node], pscope: NamespaceBinding = null): String

    Returns a formatted string containing well-formed XML.

    Returns a formatted string containing well-formed XML.

    nodes

    the sequence of nodes to be serialized

    pscope

    the namespace to prefix mapping

  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. var items: List[Item]

    Attributes
    protected
  26. def leafTag(n: Node): String

    Attributes
    protected
  27. def makeBox(ind: Int, s: String): Unit

    Try to make indented box, if possible, else para.

    Try to make indented box, if possible, else para.

    Attributes
    protected
  28. def makeBreak(): Unit

    Attributes
    protected
  29. def makePara(ind: Int, s: String): Unit

    Attributes
    protected
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def reset(): Unit

    Attributes
    protected
  34. def startTag(n: Node, pscope: NamespaceBinding): (String, Int)

    Attributes
    protected
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. def traverse(it: Iterator[Node], scope: NamespaceBinding, ind: Int): Unit

    Attributes
    protected
  38. def traverse(node: Node, pscope: NamespaceBinding, ind: Int): Unit

    Attributes
    protected
  39. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped