Parent not open: '%1'

Item Value
SQLCODE -900
Constant SQLE_EXPLICIT_TAG_NOT_OPEN
SQLSTATE WX008
Sybase error code 13581
ODBC 2 State ERROR
ODBC 3 State ERROR
Parameter 1 The parent tag id that is not among the open tags

Probable cause 

FOR XML EXPLICIT requires the parent tag for a row to be opened when that row is read. Check the order of the rows returned by the query with the FOR XML EXPLICIT clause removed.