scala.xml.parsing
class FactoryAdapter

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

`abstract` `class` FactoryAdapter
  `extends` org.xml.sax.helpers.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 : java.lang.String
`val` | hStack : Stack[Node]
`val` | normalizeWhitespace : Boolean
`var` | rootElem : Node
`var` | scopeStack : Stack[NamespaceBinding]
`val` | tagStack : Stack[java.lang.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 : java.lang.String, elemName : java.lang.String, attribs : MetaData, scope : NamespaceBinding, chIter : List[Node]) : Node creates an new non-text(tree) node.
`abstract def` | createProcInstr (target : java.lang.String, data : java.lang.String) : Seq[ProcInstr] creates a new processing instruction node.
`abstract def` | createText (text : java.lang.String) : Text creates a Text node.
`override def` | endElement (uri : java.lang.String, _localName : java.lang.String, qname : java.lang.String) : Unit End element.
`override def` | error (ex : org.xml.sax.SAXParseException) : Unit Error.
`override def` | fatalError (ex : org.xml.sax.SAXParseException) : Unit Fatal error.
`def` | load (sysID : java.lang.String) : Node loads XML from given sysID
`def` | load (reader : java.io.Reader) : Node loads XML from given Reader
`def` | load (is : java.io.InputStream) : Node loads XML from given InputStream
`def` | loadFile (fileDesc : java.io.FileDescriptor) : Node loads XML from given file descriptor
`def` | loadFile (file : java.io.File) : Node loads XML from given file
`def` | loadFile (fileName : java.lang.String) : Node loads XML from given file
`def` | loadXML (source : org.xml.sax.InputSource) : Node load XML document
`abstract def` | nodeContainsText (localName : java.lang.String) : Boolean Tests if an XML element contains text.
`protected def` | printError (errtype : java.lang.String, ex : org.xml.sax.SAXParseException) : Unit Prints the error message
`override def` | processingInstruction (target : java.lang.String, data : java.lang.String) : Unit Processing instruction.
`override def` | startElement (uri : java.lang.String, _localName : java.lang.String, qname : java.lang.String, attributes : org.xml.sax.Attributes) : Unit
`override def` | warning (ex : org.xml.sax.SAXParseException) : Unit Warning.

Methods inherited from org.xml.sax.helpers.DefaultHandler
org.xml.sax.helpers.DefaultHandler.resolveEntity, org.xml.sax.helpers.DefaultHandler.notationDecl, org.xml.sax.helpers.DefaultHandler.unparsedEntityDecl, org.xml.sax.helpers.DefaultHandler.setDocumentLocator, org.xml.sax.helpers.DefaultHandler.startDocument, org.xml.sax.helpers.DefaultHandler.endDocument, org.xml.sax.helpers.DefaultHandler.startPrefixMapping, org.xml.sax.helpers.DefaultHandler.endPrefixMapping, org.xml.sax.helpers.DefaultHandler.ignorableWhitespace, org.xml.sax.helpers.DefaultHandler.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[java.lang.String]

`` `var` scopeStack : Stack[NamespaceBinding]

`` `var` curTag : java.lang.String

`` `var` capture : Boolean

`` `val` normalizeWhitespace : Boolean

`` `var` rootElem : Node

Method Details

`abstract` `def` nodeContainsText(localName : java.lang.String) : Boolean

  Tests if an XML element contains text.

Returns
  true if element named `localName` contains text.

`abstract` `def` createNode(pre : java.lang.String, elemName : java.lang.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 : java.lang.String) : Text

  creates a Text node.

Parameters
  `text -`
Returns
  a new Text node.

`abstract` `def` createProcInstr(target : java.lang.String, data : java.lang.String) : Seq[ProcInstr]

  creates a new processing instruction node.

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

  Characters.

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

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.characters

`override` `def` startElement(uri : java.lang.String, _localName : java.lang.String, qname : java.lang.String, attributes : org.xml.sax.Attributes) : Unit

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.startElement

`` `def` captureText : Unit

  captures text, possibly normalizing whitespace

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

  End element.

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

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.endElement

`override` `def` processingInstruction(target : java.lang.String, data : java.lang.String) : Unit

  Processing instruction.

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.processingInstruction

`override` `def` warning(ex : org.xml.sax.SAXParseException) : Unit

  Warning.

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.warning

`override` `def` error(ex : org.xml.sax.SAXParseException) : Unit

  Error.

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.error

`override` `def` fatalError(ex : org.xml.sax.SAXParseException) : Unit

  Fatal error.

Overrides
  org.xml.sax.helpers.DefaultHandler.org.xml.sax.helpers.DefaultHandler.fatalError

`protected` `def` printError(errtype : java.lang.String, ex : org.xml.sax.SAXParseException) : Unit

  Prints the error message

`` `def` loadXML(source : org.xml.sax.InputSource) : Node

  load XML document

Parameters
  `source -`
Returns
  a new XML document object

`` `def` loadFile(file : java.io.File) : Node

  loads XML from given file

`` `def` loadFile(fileDesc : java.io.FileDescriptor) : Node

  loads XML from given file descriptor

`` `def` loadFile(fileName : java.lang.String) : Node

  loads XML from given file

`` `def` load(is : java.io.InputStream) : Node

  loads XML from given InputStream

`` `def` load(reader : java.io.Reader) : Node

  loads XML from given Reader

`` `def` load(sysID : java.lang.String) : Node

  loads XML from given sysID