Class StAXFeatureHandler

    • Field Detail

      • endLoc

        protected int endLoc
      • callbackStack

        protected java.util.List callbackStack
        this is the stack of handler objects for the current feature. The base value is the FeatureHandler itself. your feature and property handlers place and remove themselves from this stack. the purpose of all this is to implement context sensitivty for property handlers translucently. Property handlers can pop the stack for other handlers that implement interfaces that process that element. This way the context code is within the object that defines that context rather than in a child property handler.
    • Method Detail

      • setHandlerCharacteristics

        public void setHandlerCharacteristics​(java.lang.String localName,
                                              boolean hasCallback)
        Sets the element name that the class responds to.
      • createTemplate

        protected Feature.Template createTemplate()
        generates a very basic Template for the feature with SmallAnnotation in the annotation field.

        Override if you wish a more specialised Template.

      • getLevel

        protected int getLevel()
        return current stack level. Remember that the stack level is incremented/decremented AFTER the push()/pop() calls and superclass startElement()/StopElement calls.
      • getHandlerStackIterator

        protected java.util.ListIterator getHandlerStackIterator​(int level)
        return iterator to callbackStack
      • pop

        protected void pop()
        pop a StAXContentHandler off the stack.
      • startElementHandler

        public void startElementHandler​(java.lang.String nsURI,
                                        java.lang.String localName,
                                        java.lang.String qName,
                                        org.xml.sax.Attributes attrs)
                                 throws org.xml.sax.SAXException
        Element-specific handler. Subclass this to do something useful!
        Throws:
        org.xml.sax.SAXException
      • endElementHandler

        public void endElementHandler​(java.lang.String nsURI,
                                      java.lang.String localName,
                                      java.lang.String qName,
                                      StAXContentHandler handler)
                               throws org.xml.sax.SAXException
        Element specific exit handler Subclass to do anything useful.
        Throws:
        org.xml.sax.SAXException