in scala.xml
class PrettyPrinter

class PrettyPrinter
extends java.lang.Object
with ScalaObject
Class for pretty printing. After instantiating, you can use the toPrettyXML methods to convert XML to a formatted string. The class can be reused to pretty print any number of XML nodes.
param:
width the width to fit the output into
step:
indentation

Constructor Summary
def this ( width : scala.Int , step : scala.Int )



Class Summary
case class Box

class BrokenException

class Item

case class Para



Object Summary
case object Break



Def Summary
protected def childrenAreLeaves ( n : Node ) : scala.Boolean

protected def cut ( s : java.lang.String , ind : scala.Int ) : List

protected def endTag ( n : Node ) : java.lang.String

protected def fits ( test : java.lang.String ) : scala.Boolean

def format ( n : Node ) : java.lang.String
returns a formatted string containing well-formed XML with default namespace prefix mapping
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 : java.lang.StringBuffer ) : scala.Unit

def format ( n : Node , sb : java.lang.StringBuffer ) : scala.Unit
appends a formatted string containing well-formed XML with given namespace to prefix mapping to the given stringbuffer
def formatNodes ( nodes : Seq ) : java.lang.String

def formatNodes ( nodes : Seq , pscope : NamespaceBinding ) : java.lang.String
returns a formatted string containing well-formed XML
def formatNodes ( nodes : Seq , pscope : NamespaceBinding , sb : java.lang.StringBuffer ) : scala.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 : scala.Int , s : java.lang.String ) : scala.Unit
try to make indented box, if possible, else para
protected def makeBreak : scala.Unit

protected def makePara ( ind : scala.Int , s : java.lang.String ) : scala.Unit

protected def reset : scala.Unit

protected def startTag ( n : Node , pscope : NamespaceBinding ) : Tuple2

protected def traverse ( it : Iterator , scope : NamespaceBinding , ind : scala.Int ) : scala.Unit

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



Constructor Detail
def this ( width : scala.Int , step : scala.Int )

Def Detail
protected def childrenAreLeaves ( n : Node ) : scala.Boolean

protected def cut ( s : java.lang.String , ind : scala.Int ) : List

protected def endTag ( n : Node ) : java.lang.String

protected def fits ( test : java.lang.String ) : scala.Boolean

def format ( n : Node ) : java.lang.String
returns a formatted string containing well-formed XML with default namespace prefix mapping
param:
n the node to be serialized

def format ( n : Node , pscope : NamespaceBinding ) : java.lang.String
returns a formatted string containing well-formed XML with given namespace to prefix mapping
param:
n the node to be serialized
param:
pmap the namespace to prefix mapping

def format ( n : Node , pscope : NamespaceBinding , sb : java.lang.StringBuffer ) : scala.Unit

def format ( n : Node , sb : java.lang.StringBuffer ) : scala.Unit
appends a formatted string containing well-formed XML with given namespace to prefix mapping to the given stringbuffer
param:
n the node to be serialized
param:
pmap the namespace to prefix mapping
param:
sb the stringbuffer to append to

def formatNodes ( nodes : Seq ) : java.lang.String

def formatNodes ( nodes : Seq , pscope : NamespaceBinding ) : java.lang.String
returns a formatted string containing well-formed XML
param:
nodes the sequence of nodes to be serialized
param:
pmap the namespace to prefix mapping

def formatNodes ( nodes : Seq , pscope : NamespaceBinding , sb : java.lang.StringBuffer ) : scala.Unit
appends a formatted string containing well-formed XML with the given namespace to prefix mapping to the given stringbuffer
param:
n the node to be serialized
param:
pmap the namespace to prefix mapping
param:
sb the string buffer to which to append to

protected def leafTag ( n : Node ) : java.lang.String

protected def makeBox ( ind : scala.Int , s : java.lang.String ) : scala.Unit
try to make indented box, if possible, else para

protected def makeBreak : scala.Unit

protected def makePara ( ind : scala.Int , s : java.lang.String ) : scala.Unit

protected def reset : scala.Unit

protected def startTag ( n : Node , pscope : NamespaceBinding ) : Tuple2

protected def traverse ( it : Iterator , scope : NamespaceBinding , ind : scala.Int ) : scala.Unit

protected def traverse ( node : Node , pscope : NamespaceBinding , ind : scala.Int ) : scala.Unit
param:
tail: what we'd like to sqeeze in