Class XmlTreeRenderer.XmlRenderingConfig

    • Constructor Detail

      • XmlRenderingConfig

        public XmlRenderingConfig()
    • Method Detail

      • handleAttributeFetchException

        protected void handleAttributeFetchException​(Attribute attr,
                                                     Exception e)
        Handle an exception that occurred while fetching the value of an attribute. The default does nothing, it's meant to be overridden if you want to handle it.
        attr - Attribute for which the fetch failed
        e - Exception that occurred
      • takeAttribute

        protected boolean takeAttribute​(Node node,
                                        Attribute attribute)
        Returns true if the attribute should be included in the element corresponding to the given node. Subclasses can override this method to filter out some attributes.
        node - Node owning the attribute
        attribute - Attribute to test
      • lineSeparator

        public XmlTreeRenderer.XmlRenderingConfig lineSeparator​(String lineSeparator)
        Sets the string that should be used to separate lines. The default is the platform-specific line separator. The following special values are interpreted specially: CR, CRLF, LF, \r, \r\n and \n. The latter three use literal backslashes and are interpreted like Java escapes. The former three are named aliases for the same.
        NullPointerException - If the argument is null
      • singleQuoteAttributes

        public XmlTreeRenderer.XmlRenderingConfig singleQuoteAttributes​(boolean useSingleQuote)
        Sets the delimiters use for attribute values. The default is to use single quotes.
        useSingleQuote - True for single quotes, false for double quotes