| java.lang.Object org.jboss.mq.xml.XElementProducer
XElementProducer | public class XElementProducer (Code) | | XElementProducer parses and provides an XElementConsumer XElement data.
An XElementProducer is a SAX based XML parser. This class provides a hybrid
of the Event Based and DOM based XML parsing models. This is done by telling
the XElementProducer which elements signal the start of a record, and when
to generat an XElement. As the "record" XML elements are encountered,
XElements are produced. These XElements create an in memory DOM tree of the
element and all sub elements. After the "record" element has be fully read
in through the use of SAX events, the "record" element, now in the form of
an XElement, is passed to an XElementConsumer for processing.
author: Hiram Chirino (Cojonudo14@hotmail.com) version: $Revision: 57198 $ |
XElementProducer | public XElementProducer(XElementConsumer consumerObject)(Code) | | The Constructor must be passed the consumer object.
Parameters: consumerObject - the object that will process data produced fromthis object. |
addElementRecord | public void addElementRecord(String name)(Code) | | Adds a name to the list of element names which when encountered, will
produce an XElement record.
Parameters: name - |
clearElementRecords | public void clearElementRecords()(Code) | | Clears all the previously added element record names.
|
parse | public void parse(java.io.InputStream is) throws Exception(Code) | | Starts parsing a file. As "record" elements are encountered, record
XElements are produced and given to the XElementConsumer to process.
Parameters: is - Description of Parameter throws: Exception - includes IO errors, parse errors, or Exceptions thrownfrom the RecordConsumer. |
parse | public void parse(java.net.URL url) throws Exception(Code) | | Starts parsing a file. As "record" elements are encountered, record
XElements are produced and given to the XElementConsumer to process.
Parameters: url - Description of Parameter throws: Exception - includes IO errors, parse errors, or Exceptions thrownfrom the RecordConsumer. |
|
|