This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I used the XSOM api to parse a xsd file.
When my xsd file was not importing any other xsd file, code was working fine
Snippet of code
XSOMParser xsomParser = new XSOMParser();
XSSchemaSet xsSchemaSet = xsomParser.getResult();
XSSchema xsSchema = xsSchemaSet.getSchema(targetNamespace); //targetNamespace attribute //specified in the xsd file
When i used the same snippet of code for a xsd file which is importing other xsd files, i got null pointer exception.
The instance of XSSchemaSet is setting to null.
Please reply, if you have any idea about it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Getting null instance of XSSchemaSet when the xsd is importing another xsd (XSOM api)