"Common Problems with XML files"
Common issues with XML files 1. File cannot be identified The LA code is invalid - check your LAcode, the tag must be <LAcode> and the LA code must match your LA number. The error message will be : The file you are attempting to upload is not for the selected Source Organisation. The SourceLevel is invalid – it should be <SourceLevel>L</SourceLevel> 2. Problem with the XML structure or syntax The XML structure and tags must match those specified in 2009-10 CIN Census Specification v1-5 (on http://www.dcsf.gov.uk/datastats1/guidelines/children/returns.shtml#cin) Please note the tags are case sensitive. Example files are also available on the above website. The error message should indicate roughly where the problem is, check for Any XML element/tag whose tag is incorrectly spelt or where the case does not match ie <LAcode> is correct but <LACode> is not Any XML that is not well-formed eg missing closing tags, for every <tag> there should be a matching</tag> Any XML element that is not within its defined position eg if you had <ServiceProvider>DD</ServiceProvider> without being inside the <ServiceProvision> </ServiceProvision> tags EXAMPLES Error message Explanation The element name - //Message/ The tag name (in this case ChildCharacteristics/ ‘DateAsylumSeekingCeased’) is either DateAsylumSeekingCeased is either incorrect (in this case it should invalid or not in the expected ‘DateCeasedAsylumSeeking’), or is not position within the file. in the expected position in the file as defined in the XML schema. Details: Error parsing the file: The There is a problem with the structure 'PersonBirthDate' start tag on line of the xml file. In this case the '18' doesn't match the end tag of </PersonBirthDate> end tag is 'ChildIdentifiers' . missing. Details: Error parsing the file: The The start and end tag names do not 'PersonBirthDate' start tag on line match. In this case, the start tag '1' doesn't match the end tag of name is normal Camel case and the 'PERSONBIRTHDATE' . end tag is all Uppercase. 3. Discrepancies between values in the XML files and the SQL table specification A Date containing an invalid value such as 31 September Any item defined as numeric which contains alpha values Any item defined as an integer which contains a decimal Any item defined as a Boolean that contains a non-Boolean value (i.e. other than true, false, 0 or 1) EXAMPLES Error message Explanation Details: Unable to convert // The xml file contains an invalid Message/Children/Child/ value, in this case n/a in a Boolean ChildCharacteristics/AsylumSeeking field , value= n/a for Child Details: Unable to convert - The xml file contains an invalid //Message/Children/Child/ value, in this case an impossible ChildCharacteristics/ date. DateAsylumSeekingCeased, value= 2000-02-31 for Child