tomato
tomato

Reputation: 3383

Java equivalent of .NET's System.Xml.Schema classes?

The .NET Framework exposes a rather useful set of classes as part of the System.Xml.Schema namespace.

Among other things, classes such as XmlSchema and XmlSchemaElement provide a useful API for defining/writing and parsing/reading/traversing XML schema files.

Does an equivalent library exist for Java?

Upvotes: 3

Views: 623

Answers (1)

Gabriel Jiva
Gabriel Jiva

Reputation: 184

The tools to accomplish this are there, but I don't think there's anything specific like that in Java. What I would do is run JAXB on the XML Schema schema (http://www.w3.org/2001/XMLSchema), which will generate Java classes corresponding to the XSD constructs. Then you can use those to read/write XML schemas, and validate against the XML Schema schema.

Upvotes: 2

Related Questions