I'm in trouble with XMLNAMESPACES declaration in SqlServer2005 !
I used this declaration to put the namesspaces in the root element but with my query i have this declaration in all my nodes !
WITH XMLNAMESPACES ('urn:PCCAD:A1:schema' as PCCAD_A1,
'urn:PCCAD:A2:schema' as PCCAD_A2,
'urn:PCCAD:A3:schema' as PCCAD_A3,
'urn:PCCAD:A4:schema' as PCCAD_A4,
'urn:PCCAD:A5:schema' as PCCAD_A5,
'urn:PCCAD:A6:schema' as PCCAD_A6,
'http://www.w3.org/2001/XMLSchema-instance' as xsi)
SELECT '1' AS '@ID'
FOR XML PATH ('ELEMENT1'), TYPE
SELECT '2' AS '@ID'
FOR XML PATH ('ELEMENT2'), TYPE
FOR XML PATH ('ROOT')