public class

SaxToDomHandler

extends AbstractHandler
java.lang.Object
   ↳ org.xml.sax.helpers.DefaultHandler
     ↳ com.microstrategy.utils.xml.AbstractHandler
       ↳ com.microstrategy.utils.xml.SaxToDomHandler

Class Overview

A class that converts an XML subtree into DOM document

Summary

[Expand]
Inherited Fields
From class com.microstrategy.utils.xml.AbstractHandler
Public Constructors
SaxToDomHandler(SAXSupport pParser, String rootTag, Attributes attrs)
This constructor shall be called when parsing starts at the object's mi node.
SaxToDomHandler(SAXSupport pParser)
This constructor shall be called when parsing starts at the object's parent node.
Public Methods
Document getDocument()
Returns DOM document.
Protected Methods
void doEndElement(String uri, String local, String qName)
Override this method insted of endElement to process end element event.
void doStartElement(String uri, String local, String qName, Attributes attrs)
Override this method insted of startElement to process start element event.
void domIsReady()
Override this method to process DOM is ready event.
[Expand]
Inherited Methods
From class com.microstrategy.utils.xml.AbstractHandler
From class org.xml.sax.helpers.DefaultHandler
From class java.lang.Object
From interface org.xml.sax.ContentHandler
From interface org.xml.sax.DTDHandler
From interface org.xml.sax.EntityResolver
From interface org.xml.sax.ErrorHandler

Public Constructors

public SaxToDomHandler (SAXSupport pParser, String rootTag, Attributes attrs)

This constructor shall be called when parsing starts at the object's mi node.

Parameters
pParser a SAX parser to which this handler needs to be attached
rootTag a root element tag name
attrs a root element attributes
Throws
SAXException Any SAX exception, possibly wrapping another exception

public SaxToDomHandler (SAXSupport pParser)

This constructor shall be called when parsing starts at the object's parent node.

Parameters
pParser - a SAX parser to which this handler needs to be attached
Throws
SAXException Any SAX exception, possibly wrapping another exception

Public Methods

public Document getDocument ()

Returns DOM document. This message shall be called after the DOM is ready event happened.

Returns
  • DOM document

Protected Methods

protected void doEndElement (String uri, String local, String qName)

Override this method insted of endElement to process end element event. This way you will not have problems with depth counter while subclassing your event handlers.

Throws
SAXException

protected void doStartElement (String uri, String local, String qName, Attributes attrs)

Override this method insted of startElement to process start element event. This way you will not have problems with depth counter while subclassing your event handlers.

Throws
SAXException

protected void domIsReady ()

Override this method to process DOM is ready event.

Throws
SAXException Any SAX exception, possibly wrapping another exception