Class NamespaceDeclarationStack


  • public class NamespaceDeclarationStack
    extends Object
    This class is responsible for managing namespace declarations.
    Author:
    zubairov
    • Constructor Detail

      • NamespaceDeclarationStack

        public NamespaceDeclarationStack()
      • NamespaceDeclarationStack

        public NamespaceDeclarationStack​(XMLReader xmlReader)
    • Method Detail

      • pushNamespaces

        public Attributes pushNamespaces​(String qName,
                                         String namespace,
                                         Attributes attributes)
                                  throws SAXException
        Pushing a new element to the stack.
        Parameters:
        qName - Element QName.
        namespace - Element namespace.
        attributes - optional attributes or null, single element could declare multiple namespaces
        Returns:
        modified attributes declaration in case additional prefix mapping should be included
        Throws:
        SAXException - if an error is encountered when attempting to push the element to the stack.
      • popNamespaces

        public void popNamespaces()
                           throws SAXException
        Pop element out of the namespace declaration stack and notifying ContentHandler if required.
        Throws:
        SAXException - if an error occurs when attempting to pop the element out of the stack.
      • pushReader

        public void pushReader​(XMLReader reader)
        Push a new XMLReader instance onto the XMLReader Stack.
        Parameters:
        reader - The reader instance.
      • popReader

        public XMLReader popReader()
        Pop the current XMLReader off the XMLReader stack.
        Returns:
        The reader instance that was popped from the stack.