How can XSD2Code resolve references?

Aug 25, 2010 at 2:30 PM
Edited Aug 25, 2010 at 3:08 PM

I have spent hours testing xsd.exe, XSDObjectGen and finally I am here testing XSD2Code.

Is there a way in XSD2Code to detect references and rebuild them from a xml file?

If I have an object Foo which is assigned to Element A and Element B and is serialized.

When I deserialize the content from File A.Foo contains the same information as B.Foo but  It is not the same object in terms of references.

Here is is a tiny xsd example


<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="">

   <xsd:element name="Root">
            <xsd:element name="GroupedWith" type="Position" />
            <xsd:element name="AP" type="AttachmentPointSource"  />

   <xsd:complexType name="AttachmentPointSource">
         <xsd:element name="GroupedWith" type="Position"  />
   <xsd:complexType name="Position">
         <xsd:element name="foo" type="xsd:double" />


In this example I would like to add "Position" to AttachmentPointSource and to Root and when restoring it, it should be the same object, not a clone of it


Edit: I tried it with ref="Position" instead of type but still not the same