scala.xml.parsing
class FactoryAdapter

[source: `scala/xml/parsing/FactoryAdapter.scala`]

`abstract` `class` FactoryAdapter
  `extends` DefaultHandler `with` AnyRef

  SAX adapter class, for use with Java SAX parser. Keeps track of namespace bindings, without relying on namespace handling of the underlying SAX parser.

Direct Known Subclasses:
  NoBindingFactoryAdapter

Value Summary
`val` | attribStack : Stack[MetaData]
`val` | buffer : StringBuilder
`var` | capture : Boolean
`var` | curTag : String
`val` | hStack : Stack[Node]
`val` | normalizeWhitespace : Boolean
`var` | rootElem : Node
`var` | scopeStack : Stack[NamespaceBinding]
`val` | tagStack : Stack[String]

Method Summary
`def` | captureText : Unit captures text, possibly normalizing whitespace
`override def` | characters (ch : Array[Char], offset : Int, length : Int) : Unit Characters.
`abstract def` | createNode (pre : String, elemName : String, attribs : MetaData, scope : NamespaceBinding, chIter : List[Node]) : Node creates an new non-text(tree) node.
`abstract def` | createText (text : String) : Text creates a Text node.
`override def` | endElement (uri : String, _localName : String, qname : String) : Unit End element.
`override def` | error (ex : SAXParseException) : Unit Error.
`override def` | fatalError (ex : SAXParseException) : Unit Fatal error.
`def` | load (is : InputStream) : Node loads XML from given InputStream
`def` | load (reader : Reader) : Node loads XML from given Reader
`def` | load (sysID : String) : Node loads XML from given sysID
`def` | loadFile (fileName : String) : Node loads XML from given file
`def` | loadFile (fileDesc : FileDescriptor) : Node loads XML from given file descriptor
`def` | loadFile (file : File) : Node loads XML from given file
`def` | loadXML (source : InputSource) : Node load XML document
`abstract def` | nodeContainsText (localName : String) : Boolean Tests if an XML element contains text.
`protected def` | printError (errtype : String, ex : SAXParseException) : Unit Prints the error message
`override def` | startElement (uri : String, _localName : String, qname : String, attributes : Attributes) : Unit
`override def` | warning (ex : SAXParseException) : Unit Warning.

Methods inherited from DefaultHandler
resolveEntity, notationDecl, unparsedEntityDecl, setDocumentLocator, startDocument, endDocument, startPrefixMapping, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Value Details

`` `val` buffer : StringBuilder

`` `val` attribStack : Stack[MetaData]

`` `val` hStack : Stack[Node]

`` `val` tagStack : Stack[String]

`` `var` scopeStack : Stack[NamespaceBinding]

`` `var` curTag : String

`` `var` capture : Boolean

`` `val` normalizeWhitespace : Boolean

`` `var` rootElem : Node

Method Details

`abstract` `def` nodeContainsText(localName : String) : Boolean

  Tests if an XML element contains text.

Returns
  true if element named `localName` contains text.

`abstract` `def` createNode(pre : String, elemName : String, attribs : MetaData, scope : NamespaceBinding, chIter : List[Node]) : Node

  creates an new non-text(tree) node.

Parameters
  `elemName -`
  `attribs -`
  `chIter -`
Returns
  a new XML element.

`abstract` `def` createText(text : String) : Text

  creates a Text node.

Parameters
  `text -`
Returns
  a new Text node.

`override` `def` characters(ch : Array[Char], offset : Int, length : Int) : Unit

  Characters.

Parameters
  `ch -`
  `offset -`
  `length -`

Overrides
  DefaultHandler.characters

`override` `def` startElement(uri : String, _localName : String, qname : String, attributes : Attributes) : Unit

Overrides
  DefaultHandler.startElement

`` `def` captureText : Unit

  captures text, possibly normalizing whitespace

`override` `def` endElement(uri : String, _localName : String, qname : String) : Unit

  End element.

Parameters
  `uri -`
  `localName -`
  `qname -`
Throws
  `org.xml.sax.SAXException -` if ..

Overrides
  DefaultHandler.endElement

`override` `def` warning(ex : SAXParseException) : Unit

  Warning.

Overrides
  DefaultHandler.warning

`override` `def` error(ex : SAXParseException) : Unit

  Error.

Overrides
  DefaultHandler.error

`override` `def` fatalError(ex : SAXParseException) : Unit

  Fatal error.

Overrides
  DefaultHandler.fatalError

`protected` `def` printError(errtype : String, ex : SAXParseException) : Unit

  Prints the error message

`` `def` loadXML(source : InputSource) : Node

  load XML document

Parameters
  `source -`
Returns
  a new XML document object

`` `def` loadFile(file : File) : Node

  loads XML from given file

`` `def` loadFile(fileDesc : FileDescriptor) : Node

  loads XML from given file descriptor

`` `def` loadFile(fileName : String) : Node

  loads XML from given file

`` `def` load(is : InputStream) : Node

  loads XML from given InputStream

`` `def` load(reader : Reader) : Node

  loads XML from given Reader

`` `def` load(sysID : String) : Node

  loads XML from given sysID