Scala Library
|
|
scala/xml/PrettyPrinter.scala
]
class
PrettyPrinter(width : Int, step : Int)
extends
AnyRefwidth -
the width to fit the output into @step indentationValue Summary | |
protected var
|
cur : Int |
protected var
|
items : List[Item] |
Method Summary | |
protected def
|
childrenAreLeaves (n : Node) : Boolean |
protected def
|
cut
(s : java.lang.String, ind : Int) : List[Item]
Try to cut at whitespace.
|
protected def
|
endTag (n : Node) : java.lang.String |
protected def
|
fits (test : java.lang.String) : Boolean |
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.
|
def
|
format
(n : Node, pscope : NamespaceBinding) : java.lang.String
Returns a formatted string containing well-formed XML with
given namespace to prefix mapping.
|
def
|
format (n : Node, pscope : NamespaceBinding, sb : StringBuilder) : Unit |
def
|
format
(n : Node) : java.lang.String
returns a formatted string containing well-formed XML with
default namespace prefix mapping
|
def
|
formatNodes
(nodes : Seq[Node], pscope : NamespaceBinding) : java.lang.String
Returns a formatted string containing well-formed XML.
|
def
|
formatNodes
(nodes : Seq[Node]) : java.lang.String
Returns a formatted string containing well-formed XML nodes with
default namespace prefix mapping.
|
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.
|
protected def
|
leafTag (n : Node) : java.lang.String |
protected def
|
makeBox
(ind : Int, s : java.lang.String) : Unit
Try to make indented box, if possible, else para.
|
protected def
|
makeBreak : Unit |
protected def
|
makePara (ind : Int, s : java.lang.String) : Unit |
protected def
|
reset : Unit |
protected def
|
startTag (n : Node, pscope : NamespaceBinding) : (java.lang.String, Int) |
protected def
|
traverse (node : Node, pscope : NamespaceBinding, ind : Int) : Unit |
protected def
|
traverse (it : Iterator[Node], scope : NamespaceBinding, ind : Int) : Unit |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
case class
|
Box
(val col : Int, val s : java.lang.String) extends Item with Product
|
class
|
BrokenException
extends java.lang.Exception with AnyRef
|
class
|
Item
extends AnyRef
|
case class
|
Para
(val s : java.lang.String) extends Item with Product
|
Object Summary | |
case object
|
Break
extends Item with Product
|
Value Details |
Method Details |
protected
def
reset : Unit
protected
def
cut(s : java.lang.String, ind : Int) : List[Item]
s -
...ind -
...protected
def
makeBox(ind : Int, s : java.lang.String) : Unit
ind -
...s -
...protected
def
makePara(ind : Int, s : java.lang.String) : Unit
protected
def
makeBreak : Unit
protected
def
leafTag(n : Node) : java.lang.String
n -
...protected
def
startTag(n : Node, pscope : NamespaceBinding) : (java.lang.String, Int)
protected
def
endTag(n : Node) : java.lang.String
protected
def
fits(test : java.lang.String) : Boolean
protected
def
traverse(node : Node, pscope : NamespaceBinding, ind : Int) : Unit
tail: -
what we'd like to sqeeze inprotected
def
traverse(it : Iterator[Node], scope : NamespaceBinding, ind : Int) : Unit
def
format(n : Node, sb : StringBuilder) : Unit
n -
the node to be serializedpmap -
the namespace to prefix mappingsb -
the stringbuffer to append to
def
format(n : Node, pscope : NamespaceBinding, sb : StringBuilder) : Unit
def
format(n : Node) : java.lang.String
n -
the node to be serialized
def
format(n : Node, pscope : NamespaceBinding) : java.lang.String
n -
the node to be serializedpmap -
the namespace to prefix mapping
def
formatNodes(nodes : Seq[Node]) : java.lang.String
nodes -
...
def
formatNodes(nodes : Seq[Node], pscope : NamespaceBinding) : java.lang.String
nodes -
the sequence of nodes to be serializedpmap -
the namespace to prefix mapping
def
formatNodes(nodes : Seq[Node], pscope : NamespaceBinding, sb : StringBuilder) : Unit
n -
the node to be serializedpmap -
the namespace to prefix mappingsb -
the string buffer to which to append to
Scala Library
|
|