That does sound like a possible path, as
InputDecorator/OutputDecorator allow wrapping of parser/generator
using delegation.
Implementation of such wrapper can extend
JsonParserDelegate/JsonGeneratorDelegate (or sub-classes
FilteringParserDelegate/FilteringGeneratorDelegate) and those are
designed to allow efficient if not convenient removal/addition of
low-level tokens/events.

-+ Tatu +-


On Mon, Mar 13, 2017 at 1:38 PM,  <st...@heliossoftware.com> wrote:
> Thanks Tatu.  I was looking through the code, and noticed InputDecorator.
> I'm going to try to decorate the formatting tags differently and see how
> that goes.  I really just want the contents of that <div> as a String in my
> POJO anyway, so I might be able to decorate the formatting tags away before
> parsing, then re-insert them later.  I'll let you know how it works out.
>
> On Monday, March 13, 2017 at 4:27:47 PM UTC-4, Tatu Saloranta wrote:
>>
>> To be completely honest I don't think you can easily modify components
>> to do that, since pieces (FromXmlParser) are constructed by others.
>> Your best bet may be to pre-process content. But beyond that, how
>> would and should data be mapped?
>> JsonNode does not work that well with XML content (it is not
>> officially supported although does work for some cases), so ideally
>> result would be a POJO. But how would separate text (cdata) segments
>> be bound?
>>
>> -+ Tatu +-
>>
>>
>> On Mon, Mar 13, 2017 at 10:38 AM,  <st...@heliossoftware.com> wrote:
>> > Thank you Tatu.  If I were to try to override this behavior, where
>> > should I
>> > look in Jackson?  For example, if I wanted to try to have Jackson skip
>> > over/ignore certain tags like <i>, </i>, <b> and </b>, where should I
>> > look?
>> >
>> > On Monday, March 13, 2017 at 1:33:20 PM UTC-4, Tatu Saloranta wrote:
>> >>
>> >> Jackson XML backend does not really support mixed content -- content
>> >> model
>> >> that has both non-whitespace text AND elements. This is difficult to
>> >> represent with databinding, and is mostly operated with XML-centric
>> >> models
>> >> like DOM.
>> >>
>> >> There has been some talk about exposing this in some form or fashion,
>> >> and
>> >> I think there's an open issue or two.
>> >> But I am not aware of particularly clean design for exposing this; it
>> >> seems fundamentally at odds with typical POJOs that do not cater for
>> >> XML
>> >> infoset.
>> >>
>> >> -+ Tatu +-
>> >>
>> >>
>> >> On Mon, Mar 13, 2017 at 6:55 AM, <st...@heliossoftware.com> wrote:
>> >>>
>> >>> Is it possible to use Jackson to parse XHTML?  I am trying to parse
>> >>> this
>> >>> fragment, and the inline <i>,</i> and <b></b> tags are giving me some
>> >>> problems.
>> >>>
>> >>>      <div xmlns="http://www.w3.org/1999/xhtml";>
>> >>>      <p>
>> >>>        This is an <i>example</i> with some <b>xhtml</b> formatting.
>> >>>      </p>
>> >>>      </div>
>> >>>
>> >>> I'm getting an exception:
>> >>> java.io.IOException: Expected END_ELEMENT, got event of type 1
>> >>>
>> >>> Is there a way to configure Jackson to make this work?
>> >>>
>> >>> Thanks,
>> >>> Steve
>> >>>
>> >>> --
>> >>> 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 jackson-user...@googlegroups.com.
>> >>> To post to this group, send email to jackso...@googlegroups.com.
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> > --
>> > 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 jackson-user...@googlegroups.com.
>> > To post to this group, send email to jackso...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 jackson-user+unsubscr...@googlegroups.com.
> To post to this group, send email to jackson-user@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to