[xsd-users] Does polymorphic serializer support streaming?

Boris Kolpackov boris at codesynthesis.com
Fri Jun 5 13:11:08 EDT 2015


Hi Danny,

Danny Yue <sheepduke at 163.com> writes:

> When I serialize the whole tree using generated `Tree_' function,
> `xsi:type' can be serialized normally. However, when I use the
> serializer taken from `streaming' directory, those polymorphism
> information is lost. All the elements start with their own type name
> instead of their parent's type name and `xsi:type'. i.e.
> What I want: <node xsi:type="A" attribute="some">
> Reality: <A attribute="some">

You would need to provide more details on what exactly you are
doing during serialization. Specifically, are the polymorphic
types your "streaming points", i.e., the fragments which you
serialize one at a time or are they nested inside some other
bigger fragments? If it is the former, then you should be able
to specify the element name yourself. If it is the latter,
then I don't see how the result should be different from
using the top-level parsing function (i.e., Tree_() in your
case).

Boris



More information about the xsd-users mailing list