Class StartDocumentEvent

  • All Implemented Interfaces:
    javax.xml.stream.events.StartDocument, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants

    public class StartDocumentEvent
    extends EventBase
    implements javax.xml.stream.events.StartDocument
    • Field Detail

      • _systemId

        protected java.lang.String _systemId
      • _encoding

        protected java.lang.String _encoding
      • _standalone

        protected boolean _standalone
      • _version

        protected java.lang.String _version
      • _encodingSet

        private boolean _encodingSet
      • _standaloneSet

        private boolean _standaloneSet
    • Constructor Detail

      • StartDocumentEvent

        public StartDocumentEvent()
      • StartDocumentEvent

        public StartDocumentEvent​(java.lang.String encoding)
      • StartDocumentEvent

        public StartDocumentEvent​(java.lang.String encoding,
                                  java.lang.String version)
    • Method Detail

      • reset

        public void reset()
      • getSystemId

        public java.lang.String getSystemId()
        Returns the system ID of the XML data
        Specified by:
        getSystemId in interface javax.xml.stream.events.StartDocument
        Overrides:
        getSystemId in class EventBase
        Returns:
        the system ID, defaults to ""
      • getCharacterEncodingScheme

        public java.lang.String getCharacterEncodingScheme()
        Returns the encoding style of the XML data
        Specified by:
        getCharacterEncodingScheme in interface javax.xml.stream.events.StartDocument
        Returns:
        the character encoding, defaults to "UTF-8"
      • encodingSet

        public boolean encodingSet()
        Returns true if CharacterEncodingScheme was set in the encoding declaration of the document
        Specified by:
        encodingSet in interface javax.xml.stream.events.StartDocument
      • isStandalone

        public boolean isStandalone()
        Returns if this XML is standalone
        Specified by:
        isStandalone in interface javax.xml.stream.events.StartDocument
        Returns:
        the standalone state of XML, defaults to "no"
      • standaloneSet

        public boolean standaloneSet()
        Returns true if the standalone attribute was set in the encoding declaration of the document.
        Specified by:
        standaloneSet in interface javax.xml.stream.events.StartDocument
      • getVersion

        public java.lang.String getVersion()
        Returns the version of XML of this XML stream
        Specified by:
        getVersion in interface javax.xml.stream.events.StartDocument
        Returns:
        the version of XML, defaults to "1.0"
      • setStandalone

        public void setStandalone​(boolean standalone)
      • setStandalone

        public void setStandalone​(java.lang.String s)
      • setEncoding

        public void setEncoding​(java.lang.String encoding)
      • setDeclaredEncoding

        void setDeclaredEncoding​(boolean value)
      • setVersion

        public void setVersion​(java.lang.String s)
      • clear

        void clear()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isStartDocument

        public boolean isStartDocument()
        Specified by:
        isStartDocument in interface javax.xml.stream.events.XMLEvent
        Overrides:
        isStartDocument in class EventBase