Class OrderedAttributeXMLWriter

  • All Implemented Interfaces:
    XMLWriter, org.xml.sax.ContentHandler

    public class OrderedAttributeXMLWriter
    extends XMLWriterImpl
    A subclass of XMLWriterImpl, which writes the attributes ordered alphabetically. This is mainly useful for test purposes, when a canonical representation of the result is required for comparing against an expected value.
    • Constructor Detail

      • OrderedAttributeXMLWriter

        public OrderedAttributeXMLWriter()
    • Method Detail

      • startElement

        public void startElement​(java.lang.String pNamespaceURI,
                                 java.lang.String pLocalName,
                                 java.lang.String pQName,
                                 org.xml.sax.Attributes pAttrs)
                          throws org.xml.sax.SAXException
        Description copied from class: XMLWriterImpl
        Starts a new element.
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class XMLWriterImpl
        Parameters:
        pNamespaceURI - The namespace URI, if any, or null
        pLocalName - The local name, without prefix, or null
        pQName - The qualified name, including a prefix, or null
        pAttrs - The element attributes
        Throws:
        org.xml.sax.SAXException - Thrown in case of an IOException.