Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Getting null instance of XSSchemaSet when the xsd is importing another xsd (XSOM api)

 
harbeer kadian
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
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();
xsomParser.parse(reader);
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.

With Regards
Harbeer kadian
 
    Bookmark Topic Watch Topic
  • New Topic