19.7. Language Examples

In each of the examples that follow, we show a method for implementing the object structure of the Party schema in a particular language. We then explain how you might go about creating an Organization object from an XML document that conforms to your schema. In any of these examples, the Builder design pattern would let you create objects from an instance document. Describing how to implement this pattern with each of the languages in question and covering all the technologies needed (parsers, validation processes using those parsers, and so on) is too large a topic for this chapter. Assume for each example that a Builder object called “PartyBuilder” exists and that it can take a path to an instance document and return ...

Get XML Schema Complete Reference, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.