Class SAXUtils


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

      Fields 
      Modifier and Type Field Description
      static org.xml.sax.Attributes EMPTY_ATTRIBUTES
      Deprecated.
      Empty attributes immutable object.
    • Constructor Summary

      Constructors 
      Constructor Description
      SAXUtils()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void createElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName)
      Deprecated.
      Create a start and endElement with a empty Namespace and without Attributes
      static void createElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName, java.lang.String stringValue)
      Deprecated.
      Create a start and endElement with a empty Namespace and without Attributes The content of the Element is set to the stringValue parameter
      static void createElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName, org.xml.sax.Attributes atts)
      Deprecated.
      Create a start and endElement with a empty Namespace
      static void createElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName, org.xml.sax.Attributes atts, java.lang.String stringValue)
      Deprecated.
      Create a start and endElement with a empty Namespace The content of the Element is set to the stringValue parameter
      static void createElementNS​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName)
      Deprecated.
      Create a start and endElement without Attributes
      static void createElementNS​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName, java.lang.String stringValue)
      Deprecated.
      Create a start and endElement without Attributes The content of the Element is set to the stringValue parameter
      static void createElementNS​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes atts)
      Deprecated.
      Create a start and endElement
      static void createElementNS​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes atts, java.lang.String stringValue)
      Deprecated.
      Create a start and endElement with a empty Namespace The content of the Element is set to the stringValue parameter
      static void data​(org.xml.sax.ContentHandler contentHandler, java.lang.String data)
      Deprecated.
      Add string data
      static void endElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName)
      Deprecated.
      Create endElement with empty Namespace
      static void endElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName)
      Deprecated.
      Create endElement Prefix must be mapped to empty String
      static void startElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName)
      Deprecated.
      Create a startElement with a empty Namespace and without Attributes
      static void startElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName)
      Deprecated.
      Create a startElement without Attributes Prefix must be mapped to empty String
      static void startElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes atts)
      Deprecated.
      Create a startElement with a empty Namespace Prefix must be mapped to empty String
      static void startElement​(org.xml.sax.ContentHandler contentHandler, java.lang.String localName, org.xml.sax.Attributes atts)
      Deprecated.
      Create a startElement with a empty Namespace
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EMPTY_ATTRIBUTES

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

      • SAXUtils

        public SAXUtils()
        Deprecated.
    • Method Detail

      • data

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

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

        public static void createElement​(org.xml.sax.ContentHandler contentHandler,
                                         java.lang.String localName,
                                         java.lang.String stringValue)
                                  throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • createElement

        public static void createElement​(org.xml.sax.ContentHandler contentHandler,
                                         java.lang.String localName,
                                         org.xml.sax.Attributes atts)
                                  throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • createElement

        public static void createElement​(org.xml.sax.ContentHandler contentHandler,
                                         java.lang.String localName,
                                         org.xml.sax.Attributes atts,
                                         java.lang.String stringValue)
                                  throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • createElementNS

        public static void createElementNS​(org.xml.sax.ContentHandler contentHandler,
                                           java.lang.String namespaceURI,
                                           java.lang.String localName)
                                    throws org.xml.sax.SAXException
        Deprecated.
        Create a start and endElement without Attributes
        Parameters:
        localName - The local name (without prefix)
        Throws:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • createElementNS

        public static void createElementNS​(org.xml.sax.ContentHandler contentHandler,
                                           java.lang.String namespaceURI,
                                           java.lang.String localName,
                                           java.lang.String stringValue)
                                    throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • createElementNS

        public static void createElementNS​(org.xml.sax.ContentHandler contentHandler,
                                           java.lang.String namespaceURI,
                                           java.lang.String localName,
                                           org.xml.sax.Attributes atts)
                                    throws org.xml.sax.SAXException
        Deprecated.
        Create a start and endElement
        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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • createElementNS

        public static void createElementNS​(org.xml.sax.ContentHandler contentHandler,
                                           java.lang.String namespaceURI,
                                           java.lang.String localName,
                                           org.xml.sax.Attributes atts,
                                           java.lang.String stringValue)
                                    throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • endElement

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

        For information on the names, see startElement.

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

        public static void endElement​(org.xml.sax.ContentHandler contentHandler,
                                      java.lang.String namespaceURI,
                                      java.lang.String localName)
                               throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
      • startElement

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

        public static void startElement​(org.xml.sax.ContentHandler contentHandler,
                                        java.lang.String namespaceURI,
                                        java.lang.String localName)
                                 throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String)
      • startElement

        public static void startElement​(org.xml.sax.ContentHandler contentHandler,
                                        java.lang.String localName,
                                        org.xml.sax.Attributes atts)
                                 throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes
      • startElement

        public static void startElement​(org.xml.sax.ContentHandler contentHandler,
                                        java.lang.String namespaceURI,
                                        java.lang.String localName,
                                        org.xml.sax.Attributes atts)
                                 throws org.xml.sax.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:
        org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
        See Also:
        endElement(ContentHandler, String), Attributes