{
// [Issue#71]: When converting, we actually get TokenBuffer, which is fine
if (!(jgen instanceof ToXmlGenerator)) {
// but verify
if (!(jgen instanceof TokenBuffer)) {
throw new JsonMappingException("XmlMapper does not with generators of type other than ToXmlGenerator; got: "
+jgen.getClass().getName());
}
return null;
}
return (ToXmlGenerator) jgen;