Class DomBuilderHandler

  • All Implemented Interfaces:
    tigase.xml.SimpleHandler

    public class DomBuilderHandler
    extends Object
    implements tigase.xml.SimpleHandler
    DomBuilderHandler - implementation of SimpleHandler building DOM strctures during parsing time. It also supports creation multiple, sperate document trees if parsed buffer contains a few XML documents. As a result of work it returns always Queue containing all found XML trees in the same order as they were found in network data.
    Document trees created by this DOM builder consist of instances of Element class or instances of class extending Element class. To receive trees built with instances of proper class user must provide ElementFactory implementation creating instances of required ELement extension.

    Created: Sat Oct 2 22:01:34 2004

    Version:
    $Rev$
    Author:
    Artur Hefczyc
    • Constructor Detail

      • DomBuilderHandler

        public DomBuilderHandler​(tigase.xml.ElementFactory factory)
    • Method Detail

      • getParsedElements

        public Queue<tigase.xml.Element> getParsedElements()
      • error

        public void error​(String msg)
        Specified by:
        error in interface tigase.xml.SimpleHandler
      • elementCData

        public void elementCData​(StringBuilder cdata)
        Specified by:
        elementCData in interface tigase.xml.SimpleHandler
      • endElement

        public boolean endElement​(StringBuilder name)
        Specified by:
        endElement in interface tigase.xml.SimpleHandler
      • otherXML

        public void otherXML​(StringBuilder other)
        Specified by:
        otherXML in interface tigase.xml.SimpleHandler
      • saveParserState

        public void saveParserState​(Object state)
        Specified by:
        saveParserState in interface tigase.xml.SimpleHandler
      • restoreParserState

        public Object restoreParserState()
        Specified by:
        restoreParserState in interface tigase.xml.SimpleHandler