public class

SAXXMLStringDumper

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

Class Overview

This class helps extract a valid XML string embedded inside another xml. for instance, you could extract something from the string something. Note that this handler would not work if the substring to be extracted is not valid XML

Summary

Fields
protected XMLBuilder xb
[Expand]
Inherited Fields
From class com.microstrategy.utils.xml.AbstractHandler
Public Constructors
SAXXMLStringDumper()
SAXXMLStringDumper(SAXSupport pParser)
Public Methods
void addTopLevelNode(String local, Attributes attrs)
void characters(char[] ch, int start, int length)
void clearBuffer()
void endTopLevelNode()
String getString()
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.
XMLBuilder getBuilder()
[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

Fields

protected XMLBuilder xb

Public Constructors

public SAXXMLStringDumper ()

public SAXXMLStringDumper (SAXSupport pParser)

Public Methods

public void addTopLevelNode (String local, Attributes attrs)

Throws
SAXException

public void characters (char[] ch, int start, int length)

Parameters
ch The characters.
start The start position in the character array.
length The number of characters to use from the character array.
Throws
SAXException

public void clearBuffer ()

public void endTopLevelNode ()

public String getString ()

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 XMLBuilder getBuilder ()