Xml validating reader example
Where the error message refers to an invalid child element it means that the fields within an entity in the file are not in the correct order as defined by the schema (XSD).
This could mean that a field is missing altogether, or that existing fields are not in the correct place.
This error may occur where a required or mandatory field has been excluded from the record because the value is not known.
In this case you would need to locate the missing data and ensure that this is included in the XML extract submitted.
This means that errors cannot be traced to a particular record.
If however a value cannot be identified and the field is not required for the record, you should remove the field from the file altogether.
In the example below, there is a This type of error occurs where an entity or field is missing a closing tag.
Remember that each field or entity must be correctly opened and closed in order for validation to read the file.
Tip: The minimum and maximum occurrences detailed in the field detail in the coding manual will inform you whether or not a field can be excluded from the record.
In this version of the error message there has been a code returned, however it does not conform to the schema and is invalid.
The schema tree diagram may assist you in identifying the correct order and consequently rectifying the issue with the file.