Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: FOR XML PATH + file structure FOR XML PATH + file structureTo: NULL Date: 12/6/2006 4:03:00 AM
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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
