Class StaxUtil
java.lang.Object
com.fasterxml.jackson.dataformat.xml.util.StaxUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XMLInputFactorystatic XMLOutputFactorystatic StringsanitizeXmlTypeName(String name) Since XML names can not contain all characters JSON names can, we may need to replace characters.static <T> Tstatic <T> Tstatic org.codehaus.stax2.typed.Base64VariantHelper method used to "convert" Jackson'sBase64Variantinto corresponding Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well.
-
Constructor Details
-
StaxUtil
public StaxUtil()
-
-
Method Details
-
throwAsParseException
- Throws:
IOException- Since:
- 2.9
-
throwAsGenerationException
public static <T> T throwAsGenerationException(XMLStreamException e, JsonGenerator g) throws IOException - Throws:
IOException- Since:
- 2.9
-
sanitizeXmlTypeName
Since XML names can not contain all characters JSON names can, we may need to replace characters. Let's start with trivial replacement of ASCII characters that can not be included. -
toStax2Base64Variant
Helper method used to "convert" Jackson'sBase64Variantinto corresponding Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well.- Parameters:
j64b- Jackson base64 variant to find match for- Returns:
- Stax2 Base64 variant that most closely resembles Jackson canonical Base64 variant passed in as argument
- Since:
- 2.12
-
defaultInputFactory
- Since:
- 2.14
-
defaultOutputFactory
- Since:
- 2.14
-