|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mq.xml.XElementProducer
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.
Constructor Summary | |
XElementProducer(XElementConsumer consumerObject)
The Constructor must be passed the consumer object. |
Method Summary | |
void |
addElementRecord(String name)
Adds a name to the list of element names which when encountered, will produce an XElement record. |
void |
clearElementRecords()
Clears all the previously added element record names. |
void |
parse(InputStream is)
Starts parsing a file. |
void |
parse(URL url)
Starts parsing a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XElementProducer(XElementConsumer consumerObject)
consumerObject
- the object that will process data produced from
this object.Method Detail |
public void addElementRecord(String name)
name
- public void clearElementRecords()
public void parse(InputStream is) throws Exception
is
- Description of Parameter
Exception
- includes IO errors, parse errors, or Exceptions thrown
from the RecordConsumer.public void parse(URL url) throws Exception
url
- Description of Parameter
Exception
- includes IO errors, parse errors, or Exceptions thrown
from the RecordConsumer.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |