Home > Archive > MS SQL XML > October 2005 > element centric XML --- for XML explicit - suggestion needed









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author element centric XML --- for XML explicit - suggestion needed
Toby

2005-10-27, 9:26 am

my xml would be like.
<X>
-<XY>
-<XYZ>
<![CDATA[ hello adkfsd ]]>
</XYZ>
-<XYZ1>
<![CDATA[ hell adkfsd ]]>
</XYZ1>
<XY>
<XY1>
....
</XY1
</X>


it is very element centric . All the data comes from a single table.
here just for mentioning the parent tag for the datas i need to write a
select.
i wrote a query which had 6 selects and got the XML.
two of the select querys were written just to include the name for the
parent tag.

can someone pls tell me if its possible to improvise..
is it possible to use for xml auto and get CDATA..

waiting for ur replies,
toby










Peter Flynn

2005-10-27, 9:26 am

Toby wrote:

> my xml would be like.
> <X>
> -<XY>
> -<XYZ>
> <![CDATA[ hello adkfsd ]]>
> </XYZ>
> -<XYZ1>
> <![CDATA[ hell adkfsd ]]>
> </XYZ1>
> <XY>
> <XY1>
> ....
> </XY1
> </X>
>
>
> it is very element centric . All the data comes from a single table.
> here just for mentioning the parent tag for the datas i need to write a
> select.
> i wrote a query which had 6 selects and got the XML.
> two of the select querys were written just to include the name for the
> parent tag.
>
> can someone pls tell me if its possible to improvise..
> is it possible to use for xml auto and get CDATA..


Do you really need CDATA Sections? They are often unnecessary.
See http://xml.silmaril.ie/authors/cdata/

///Peter

Michael Rys [MSFT]

2005-10-27, 9:26 am

I have to second Peter's sentiment about CDATA sections. CDATA sections are
meant for helping manual authoring of XML documents and should not be used
otherwise.

And no, FOR XML AUTO does not provide a way to generate CDATA sections. You
would have to use the EXPLICIT mode.

Best regards
Michael

"Peter Flynn" <peter.nosp@m.silmaril.ie> wrote in message
news:3sahonFn6kgqU4@
individual.net...
> Toby wrote:
>
>
> Do you really need CDATA Sections? They are often unnecessary.
> See http://xml.silmaril.ie/authors/cdata/
>
> ///Peter
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com