| 
	
 | 
 Posted by Vins on 12/06/06 11:27 
Hey there, 
 
I used the FOR XML PATH feature but the XML result is in only one line, 
it does not conserve the XML structure (treeview). When I open the XML 
file with IE, it s working very (I have the XML hierarchy) but when I 
use Visual Studio or other tool to edit it, I ve just one line! 
 
For example: 
<children group=""><child firstname="" lastname=""></child>=""><child 
firstname="" 
lastname=""></child>..............................</children>............ 
 
And I d like to have 
<children group=""> 
   <child firstname="" lastname=""></child>=""> 
   <child firstname="" lastname=""></child> 
   .............................. 
</children> 
.............. 
 
To give you an example of the query: 
 
	SELECT	Child.group AS '@group', 
 
		(SELECT firstname	AS '@firstname', 
		              lastname	AS '@lastname' 
 
		FROM Collecte_Data_Extract cde 
 
		FOR XML PATH('child'), TYPE) 
 
	FROM Feed AS Child 
	FOR XML PATH('children'), TYPE 
 
Any idea? 
Many thanks in advance
 
  
Navigation:
[Reply to this message] 
 |