The issue is with the final xml document specifically the ordering of some elements.
Element Originator is coming before element OriginManfest.
Element BusinessAddress is coming before StateCode.
Element OutofStateWages is coming out before TotalWages.
As as result, when I send test files to state govenment I get invalid child errors because the previously mentioned elements are out of sequence.
Not being an xml person I have done due digilence in getting this far. All data and elements in the final document are correct except for the sequencing of the mentioned elements. The document is well formed.
A review and advice and direction from anyone using schemas with the xmlns:sql="urn:schemas-microsoft-com:mapping-schema" namespace would be much appreciate.