Package cdc.util.xml

Enum XmlWriter.Feature

    • Enum Constant Detail

      • PRETTY_PRINT

        public static final XmlWriter.Feature PRETTY_PRINT
        If set, pretty print output.
      • USE_XML_EOL

        public static final XmlWriter.Feature USE_XML_EOL
        If set, use LF for EOL.

        Otherwise, use platform way to mark EOL.
        This applies to text, comments and attributes.

      • APPEND_FINAL_EOL

        public static final XmlWriter.Feature APPEND_FINAL_EOL
        If set, and PRETTY_PRINT is also enabled, appends EOL on last line.

        Otherwise, last line does not end with EOL.

      • USE_SINGLE_QUOTE

        public static final XmlWriter.Feature USE_SINGLE_QUOTE
        If set, use single quote instead of double quote for attribute delimiter.
      • ALWAYS_ENTITIZE_ATTRIBUTES

        public static final XmlWriter.Feature ALWAYS_ENTITIZE_ATTRIBUTES
        If set, always replaces certain characters by their entity in attributes, even if this is not necessary.
        • ' is replaced even if delimiter is ".
        • " is replaced even if delimiter is '.
        • > is replaced even if not mandatory.
        WARNING: This option has no effect of replacement of:
        • \t, which is always replaced.
        • \n, which is always replaced.
        • \r, which is always replaced.
        • &, which is always replaced.
        • <, which is always replaced.
      • ALWAYS_ENTITIZE_ELEMENTS

        public static final XmlWriter.Feature ALWAYS_ENTITIZE_ELEMENTS
        If set,always replaces certain characters by their corresponding entity in elements.
      • USE_CONVERTER

        public static final XmlWriter.Feature USE_CONVERTER
        If set, use converter for element and attribute names.
      • ALLOW_PARTIAL_XML

        public static final XmlWriter.Feature ALLOW_PARTIAL_XML
        If enabled, partial xml writing is allowed.

        Otherwise, only xml documents (and their content) can be produced.
        This option must be set to allow generating, for example:

        • A pure comment: <!-- a comment -->
        • An element (and its content): <element att="value"/>
      • DONT_VALIDATE_NAMES

        public static final XmlWriter.Feature DONT_VALIDATE_NAMES
        If enabled, elements and attributes names are not checked.
      • DONT_VALIDATE_CHARS

        public static final XmlWriter.Feature DONT_VALIDATE_CHARS
        If enabled, elements content and attributes values are not checked.
    • Method Detail

      • values

        public static XmlWriter.Feature[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (XmlWriter.Feature c : XmlWriter.Feature.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static XmlWriter.Feature valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null