West Wind Internet and Client Tools
XML / XSD
Gravatar is a globally recognized avatar based on your email address. XML / XSD
  Vincent H.
  All
  Feb 21, 2019 @ 12:35am

Hi Rick,

Have you planned anything special to work in XML with XSD schemas ?

Vincent

Gravatar is a globally recognized avatar based on your email address. re: XML / XSD
  Rick Strahl
  Vincent H.
  Feb 21, 2019 @ 11:07am

No... 😃

wwXML supports importing complex types using a FoxPro object as input to figure out type information but that's about the extent of it.

The problem with XML - unlike JSON - is that it doesn't have fixed structure that can be deduced on the fly. Schema helps, but parsing schema and building an object graph is very difficult and better left to some sort of system library which sadly doesn't exist (even in .NET). There are tools that do, but that's either to slow and too cumbersome (generate .NET code) to use effectively.

For Web Services the West Wind Web Service Proxy Generator can pick up WSDL schemas pretty well.

Other than that FoxPro supports schemas in the XmlAdapter, but it's severely limited due to its focus on cursors - you have to create the appropariate cursors and relationships to feed complex data into.

The short answer is no - never supported that because it's too messy of a problem with too many points of failure due to spec differences and interpretations. If you control both ends of the messages my suggestion would be to look into JSON as the transport as it intrinsically allows for 'schema' via its simple type structure.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: XML / XSD
  Vincent H.
  Rick Strahl
  Feb 21, 2019 @ 11:44pm

Thank you Rick for this long, well-argued answer.
I will try to use at best wwXML and MsXml2 ...

Vincent

© 1996-2019