Module java.xml

Interface StartDocument

所有超级接口:
XMLEvent, XMLStreamConstants

public interface StartDocument extends XMLEvent
一个用于开始文档事件的接口
自1.6版本起:
1.6
  • Method Details

    • getSystemId

      String getSystemId()
      返回XML数据的系统ID
      返回:
      系统ID,默认为""
    • getCharacterEncodingScheme

      String getCharacterEncodingScheme()
      返回XML数据的编码样式
      返回:
      字符编码,默认为"UTF-8"
    • encodingSet

      boolean encodingSet()
      如果文档的编码声明中设置了CharacterEncodingScheme,则返回true
      返回:
      如果设置了CharacterEncodingScheme,则返回true,否则返回false
    • isStandalone

      boolean isStandalone()
      返回此XML是否是独立的
      返回:
      XML的独立状态,默认为"no"
    • standaloneSet

      boolean standaloneSet()
      如果文档的编码声明中设置了独立属性,则返回true
      返回:
      如果设置了独立属性,则返回true,否则返回false
    • getVersion

      String getVersion()
      返回此XML流的XML版本
      返回:
      XML的版本,默认为"1.0"