XSD (schemas) with xs:any tags

  • Follow


Hello.

I used svcutil (XMLSerializer though) to do code generation for me on my 
schemas which includes xs:any elements.

Where these xs:any elements exist, svcutil produces classes with member 
variables and their associated public properties of type:
System.Xml.XmlElement

I am taking the generated classes from svcutil and building a dll of them.  
I want someone using this dll to be able to put their type into the classes 
that had the xs:any and thus XmlElement will not work.

I can not stick just any old type in their because I don't want the 
auto-generated schema from the class to include a specific type reference.  I 
was thinking about putting a base type in there or even a type of type 
"object" and have the person using my dll inherit from that type.  I was 
thinking of combining this with the Visitor Pattern to give me control of 
what is extended.  The downside of this is that my dll user would have to 
inherit from my type and could not use inheritance on their own type.

Any thoughts on this and in dealing with xs:any?  Thank you.
0
Reply Utf 5/25/2010 2:48:01 PM


0 Replies
890 Views

(page loaded in 0.004 seconds)


Reply: