Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.xml
Class TreeBuilder

java.lang.Object
  |
  +--oracle.cabo.share.xml.TreeBuilder

public class TreeBuilder
extends java.lang.Object

Class responsible for building a tree of objects from an XML stack. TreeBuilders are thread safe, and so can be used from multiple threads simultaneously.


Constructor Summary
TreeBuilder()
          Creates a TreeBuilder with no ParserManager or root class.
TreeBuilder(ParserManager manager, java.lang.Class rootClass)
          Creates a TreeBuilder using a given ParserManager.
 
Method Summary
 java.lang.Object parse(XMLProvider provider, org.xml.sax.InputSource source, ErrorLog log)
          Parses the document.
 java.lang.Object parse(XMLProvider provider, org.xml.sax.InputSource source, ParseContext context)
          Parses the document.
 java.lang.Object parse(XMLProvider provider, org.xml.sax.InputSource source, ParseContext context, NodeParser rootParser)
          Parses the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeBuilder

public TreeBuilder()
Creates a TreeBuilder with no ParserManager or root class. Such a TreeBuilder can only be used with NodeParsers that never try to use ParseContext.getParser().

TreeBuilder

public TreeBuilder(ParserManager manager,
                   java.lang.Class rootClass)
Creates a TreeBuilder using a given ParserManager.
Parameters:
manager - the ParserManager to use
rootClass - the desired type of object to return as the root
Method Detail

parse

public java.lang.Object parse(XMLProvider provider,
                              org.xml.sax.InputSource source,
                              ErrorLog log)
                       throws java.io.IOException,
                              org.xml.sax.SAXException
Parses the document.
Parameters:
provider - an implementation of the XMLProvider interface
source - a SAX input source
log - an error log for recording errors
Returns:
an object that is an instance of the desired class

parse

public java.lang.Object parse(XMLProvider provider,
                              org.xml.sax.InputSource source,
                              ParseContext context)
                       throws java.io.IOException,
                              org.xml.sax.SAXException
Parses the document.
Parameters:
provider - an implementation of the XMLProvider interface
source - a SAX input source
context - a parsing context
Returns:
an object that is an instance of the desired class

parse

public java.lang.Object parse(XMLProvider provider,
                              org.xml.sax.InputSource source,
                              ParseContext context,
                              NodeParser rootParser)
                       throws java.io.IOException,
                              org.xml.sax.SAXException
Parses the document.
Parameters:
provider - an implementation of the XMLProvider interface
source - a SAX input source
context - a parsing context
rootParser - the root parser to start with; if null, a root parser will be derived based on the rootClass requested in the constructor.
Returns:
an object that is the result of parsing.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.