XmlEncodingBase (Apache Tomcat 10.1.59 API Documentation)
Description: declaration: package: org.apache.tomcat.util.descriptor.web, class: XmlEncodingBase

# Class XmlEncodingBase

java.lang.Object
org.apache.tomcat.util.descriptor.web.XmlEncodingBase

Direct Known Subclasses:
  `ErrorPage, FilterMap, JspPropertyGroup, LoginConfig, SecurityCollection, SecurityConstraint, WebXml`

@Deprecated public abstract class XmlEncodingBase extends Object
Deprecated.
This abstract class will be removed in Tomcat 12 onwards
Base class for those elements that need to track the encoding used in the source XML.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XmlEncodingBase()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Charset`
  `getCharset()`
  Deprecated.
  `void`
  `setCharset(Charset charset)`
  Deprecated.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### XmlEncodingBase

    @Deprecated public XmlEncodingBase()
    Deprecated.
    Default constructor.

- ## Method Details

  - ### setCharset

    @Deprecated public void setCharset(Charset charset)
    Deprecated.
    Set the character encoding of the XML source used to populate this object.
    Parameters:
      `charset` - The character encoding

  - ### getCharset

    @Deprecated public Charset getCharset()
    Deprecated.
    Obtain the character encoding of the XML source that was used to populate this object.
    Returns:
      The character encoding of the associated XML source or `UTF-8` if the encoding could not be determined