Thanks Tatu, it means I need to use e.g Jaxb or other tool that operates on Xml for xml parsing, and get elemnts I need.
I wanted to have one code for formats, and it would work in jackson if not this edge case. sob., 11 lip 2020, 05:57 użytkownik Tatu Saloranta <[email protected]> napisał: > On Fri, Jul 10, 2020 at 8:29 PM Łukasz Gebel <[email protected]> wrote: > > > > Hi! > > > > I try to achieve the following thing using Jackson-data-format-xml: > > > <rootElement><firstElement>value</firstElement><rawElement>...</rawElement><rootElement> > > > > And after deserializing it I need to read the whole rawElement as well > as its children as String property (without any changes). > > I tried to use @JsonDeserialize & custom deserializer, but it works on > JsonNode abstraction & I cannot get to the raw XML values. > > There is no way to get underlying "raw" XML content in any way: most > Java parsers typically do not expose it (as they do not necessarily > buffer undecoded content but handle entity replacement, linefeed > normalization as so on). > > -+ Tatu +- > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jackson-user/CAL4a10iFYDvwabMqKauzNOzBNpWAnj255h0qhYBVucNtHW%2Bs%3Dg%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAF-mXfm-94BdhCLAfXCYuQZNijRAbqmSBdPBAY_UR56jTt25PQ%40mail.gmail.com.
