Interface FormatXMLContentHandlerType<A>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      A get()  
      <B> FormatXMLContentHandlerType<B> map​(java.util.function.Function<A,​B> f)
      Apply f to the results of this content handler.
      void onCharacters​(char[] ch, int start, int length)
      Text was received.
      java.util.Optional<A> onElementFinished​(java.lang.String namespace, java.lang.String name, java.lang.String qname)
      An XML element has finished.
      void onElementStarted​(java.lang.String namespace, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attributes)
      An XML element has been started.
    • Method Detail

      • map

        <B> FormatXMLContentHandlerType<B> map​(java.util.function.Function<A,​B> f)
        Apply f to the results of this content handler.
        Type Parameters:
        B - The type of returned values
        Parameters:
        f - The function
        Returns:
        A content handler that produces values of type B
      • onElementStarted

        void onElementStarted​(java.lang.String namespace,
                              java.lang.String name,
                              java.lang.String qname,
                              org.xml.sax.Attributes attributes)
                       throws org.xml.sax.SAXException
        An XML element has been started.
        Parameters:
        namespace - The namespace URI
        name - The local element name
        qname - The fully qualified name
        attributes - The attributes
        Throws:
        org.xml.sax.SAXException - On errors
      • onElementFinished

        java.util.Optional<A> onElementFinished​(java.lang.String namespace,
                                                java.lang.String name,
                                                java.lang.String qname)
                                         throws org.xml.sax.SAXException
        An XML element has finished.
        Parameters:
        namespace - The namespace URI
        name - The local element name
        qname - The fully qualified name
        Returns:
        A value of A if the given element finished the content
        Throws:
        org.xml.sax.SAXException - On errors
      • onCharacters

        void onCharacters​(char[] ch,
                          int start,
                          int length)
                   throws org.xml.sax.SAXException
        Text was received.
        Parameters:
        ch - The character buffer
        start - The offset of the start of the data in the buffer
        length - The length of the data in the buffer
        Throws:
        org.xml.sax.SAXException - On errors
      • get

        A get()
        Returns:
        The completed value