On Sat, Feb 27, 2021 at 11:30 AM Jefferson Carpenter <jeffersoncarpenter2@gmail.com> wrote:
I guess another possibility would be to write two vtables: one for
IStream and String, and another for IDOMDocumnt, and assign the vtable
during put_output.

(I'm half joking, it would run properly but swapping out vtables is not
something I've ever heard of)

Yes, that would be better. You don't need to swap actual interface vtables, you'll need to come up with a set of functions
that would be called internally from SAX methods, and then you can have multiple implementations of those.
 

thanks,
Jefferson

On 2/26/2021 10:49 PM, Jefferson Carpenter wrote:
> nsivov,
>
> Regarding implementation in mxwriter, do you think it would be all right
> to add switch statements and use an enum for output type like I did
> here, or do you think another way would be more suitable?
>
> Thanks,
> Jefferson