Does any know how to tell xsd.exe (or Xmlserialize or Xmldeserialize) not to
read/write the "xsi:*" type attributes for complex classes that inherit from
other complex classes since after the first Serialization and subsequent
Deserialization in which a base class has the anyAttribute element the
Object Model will have an attribute created for an element that is for the
xsi:* complex type: thereafter, the XML instance document will not parse
since there are two attributes with xsi:*. For example, if the XML schema
has a complex type called "A" in which there is the anyAttribute element,
and there is an inherited complex class called "B", the initial XML document
will have an attribute called "... xsi:type "B" for an element of type A,
and after it is written to XML, and reconstructed back into the object
model, it will have an anyAtrribute created for xsi:B, and then on the next
write to XML. there will be two attributes for the element named xsi:B, at
which time the next read from the XML document will cause extreme problems.
I could always look for attributes with names "xsi:* when the object model
is constructed from the XML instance document and then delete them, but that
doesn't feel good. I played around with the "namespace=##other paremeter but
that didn't help. I suppose I can use anyElement instead of anyAttibute but
again, that doesn't feel good to acquiesce to the death to all devices: the
computer.
Any help will be nice. Jon.