Interface XmlNameProcessor
-
- All Superinterfaces:
java.io.Serializable
public interface XmlNameProcessor extends java.io.Serializable
API of processors primarily used for dealing with XML names containing invalid characters. Invalid characters in names can, for instance, easily appear in map keys.Processors should be set in the
XmlMapper.setXmlNameProcessor(com.fasterxml.jackson.dataformat.xml.XmlNameProcessor)
and/or theXmlMapper.Builder.xmlNameProcessor(com.fasterxml.jackson.dataformat.xml.XmlNameProcessor)
methods.See
XmlNameProcessors
for default processors.- Since:
- 2.14
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
XmlNameProcessor.XmlName
Representation of an XML element or attribute name
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
decodeName(XmlNameProcessor.XmlName name)
Used during XML deserialization.void
encodeName(XmlNameProcessor.XmlName name)
Used during XML serialization.
-
-
-
Method Detail
-
encodeName
void encodeName(XmlNameProcessor.XmlName name)
Used during XML serialization.This method should process the provided
XmlNameProcessor.XmlName
and escape / encode invalid XML characters.- Parameters:
name
- The name to encode
-
decodeName
void decodeName(XmlNameProcessor.XmlName name)
Used during XML deserialization.This method should process the provided
XmlNameProcessor.XmlName
and revert the encoding done in theencodeName(XmlName)
method.Note: Depending on the use case, it is not always required (or even possible) to reverse an encoding with 100% accuracy.
- Parameters:
name
- The name to encode
-
-