Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

NullPointerException with xsd validation and xml

Hi all,
I have a big problem and don´t know how to solve it. Maybe there is someone with some help.
I have a xsd-schema in which I have some fields with a minOccurs = 0 attribute. xsd-Validation is no problem and 100% working.
If there is the minOccurs = 0 fields are missing the validation gets to "valid" because the xsd-schema describes it.

But, after that I have to work with the xml-file and my tFileInputXML-component needs to have a static schema for the xml-file.
If there is tag missing, what is okay for xsd-validation, the component throws a "NullPointerException". I think it can´t be that I´m the only one with such a problem.

So what I´ve done:
- Validate the xml-file against the xsd-Validation component
- if validation got okay, the xml-should be loaded into my database
- so I´ve created xml-Metadata with using xsd-schema
- using this schema, needs that the xml-file coming that they have a full schema described in the xsd-schema

Loading the xml-file without having a minOccurs = 0 Tag in the xml-file throws directly a "NullPointerException". The question is, how is it possible to declare all minOccurs = 0 tags and blocks as optional for the xml-schema I have to use, or how is it possible to fetch the "NPE"?
Thanks for your help

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi,
Could you please post your job setting screenshots into forum?
Best regards
Sabrina