Class SAXUtils


  • @Deprecated(since="2022-01-27")
    public class SAXUtils
    extends Object
    Deprecated.
    This API is deprecated, migrate code to the XML APIs provided by the JDK.
    XML utility methods.
    • Field Detail

      • EMPTY_ATTRIBUTES

        public static final Attributes EMPTY_ATTRIBUTES
        Deprecated.
        Empty attributes immutable object.
    • Constructor Detail

      • SAXUtils

        public SAXUtils()
        Deprecated.
    • Method Detail

      • data

        public static void data​(ContentHandler contentHandler,
                                String data)
                         throws SAXException
        Deprecated.
        Add string data
        Parameters:
        contentHandler - The SAX content handler
        data - The string data
        Throws:
        SAXException
      • createElement

        public static void createElement​(ContentHandler contentHandler,
                                         String localName)
                                  throws SAXException
        Deprecated.
        Create a start and endElement with a empty Namespace and without Attributes
        Parameters:
        localName - The local name (without prefix)
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • createElement

        public static void createElement​(ContentHandler contentHandler,
                                         String localName,
                                         String stringValue)
                                  throws SAXException
        Deprecated.
        Create a start and endElement with a empty Namespace and without Attributes The content of the Element is set to the stringValue parameter
        Parameters:
        localName - The local name (without prefix)
        stringValue - The content of the Element
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • createElement

        public static void createElement​(ContentHandler contentHandler,
                                         String localName,
                                         Attributes atts)
                                  throws SAXException
        Deprecated.
        Create a start and endElement with a empty Namespace
        Parameters:
        localName - The local name (without prefix)
        atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • createElement

        public static void createElement​(ContentHandler contentHandler,
                                         String localName,
                                         Attributes atts,
                                         String stringValue)
                                  throws SAXException
        Deprecated.
        Create a start and endElement with a empty Namespace The content of the Element is set to the stringValue parameter
        Parameters:
        localName - The local name (without prefix)
        atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        stringValue - The content of the Element
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • createElementNS

        public static void createElementNS​(ContentHandler contentHandler,
                                           String namespaceURI,
                                           String localName,
                                           String stringValue)
                                    throws SAXException
        Deprecated.
        Create a start and endElement without Attributes The content of the Element is set to the stringValue parameter
        Parameters:
        localName - The local name (without prefix)
        stringValue - The content of the Element
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • createElementNS

        public static void createElementNS​(ContentHandler contentHandler,
                                           String namespaceURI,
                                           String localName,
                                           Attributes atts,
                                           String stringValue)
                                    throws SAXException
        Deprecated.
        Create a start and endElement with a empty Namespace The content of the Element is set to the stringValue parameter
        Parameters:
        localName - The local name (without prefix)
        atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        stringValue - The content of the Element
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • endElement

        public static void endElement​(ContentHandler contentHandler,
                                      String localName)
                               throws SAXException
        Deprecated.
        Create endElement with empty Namespace

        For information on the names, see startElement.

        Parameters:
        localName - The local name (without prefix)
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
      • endElement

        public static void endElement​(ContentHandler contentHandler,
                                      String namespaceURI,
                                      String localName)
                               throws SAXException
        Deprecated.
        Create endElement Prefix must be mapped to empty String

        For information on the names, see startElement.

        Parameters:
        localName - The local name (without prefix)
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
      • startElement

        public static void startElement​(ContentHandler contentHandler,
                                        String namespaceURI,
                                        String localName)
                                 throws SAXException
        Deprecated.
        Create a startElement without Attributes Prefix must be mapped to empty String
        Parameters:
        namespaceURI - The Namespace URI
        localName - The local name (without prefix)
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • startElement

        public static void startElement​(ContentHandler contentHandler,
                                        String localName,
                                        Attributes atts)
                                 throws SAXException
        Deprecated.
        Create a startElement with a empty Namespace
        Parameters:
        localName - The local name (without prefix)
        atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • startElement

        public static void startElement​(ContentHandler contentHandler,
                                        String namespaceURI,
                                        String localName,
                                        Attributes atts)
                                 throws SAXException
        Deprecated.
        Create a startElement with a empty Namespace Prefix must be mapped to empty String
        Parameters:
        namespaceURI - The Namespace URI
        localName - The local name (without prefix)
        atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        Throws:
        SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes