Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - FOR XML PATH + file structure >Thread Next - Re: FOR XML PATH + file structure Re: FOR XML PATH + file structureTo: NULL Date: 12/6/2006 1:09:00 PM
In VS you can use Ctrl+K, Ctrl+D to reformat.
--
Joe Fawcett (MVP - XML)
http://joe.fawcett.name
"Vins" <vbellet@g...> wrote in message
news:1165406584.940525.21010@f......
> 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 | |||
|
