Home > Archive > MS SQL XML > October 2005 > CDATA and SQL Server 2005









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 CDATA and SQL Server 2005
jones6

2005-10-27, 9:25 am

Hi I am using the June CTP and I am wondering about Inserting XML Documents
with CDATA Sections.

I insert it this way.

UPDATE ExportTable
SET ConfigFile =
'<Export Assembly="Test.dll">
<![CDATA[<ExportData>"</ExportData>]]>
</Export>'

Here is what I see when I select ConfigFile

<Export Assembly="Test.dll"><ExportData>"</ExportData>
</Export>

Is there a way to set the value and preserve the CDATA section when I select
it?
Michael Rys [MSFT]

2005-10-27, 9:25 am

CDATA sections are a means to INPUT several characters that are reserved in
XML such as <>&'". CDATA sections are not preserved in the XML data model,
so we cannot roundtrip them.

However, the data that you see should contain the entitized &lt; instead of
< etc. Your tool may show it de-entitized (but then probably in a different
color).

Best regards
Michael


"jones6" <jones6@discussions.microsoft.com> wrote in message
news:13D5EFD4-93C0-40A2-9339- 9BF54372E715@microso
ft.com...
> Hi I am using the June CTP and I am wondering about Inserting XML
> Documents
> with CDATA Sections.
>
> I insert it this way.
>
> UPDATE ExportTable
> SET ConfigFile =
> '<Export Assembly="Test.dll">
> <![CDATA[<ExportData>"</ExportData>]]>
> </Export>'
>
> Here is what I see when I select ConfigFile
>
> <Export Assembly="Test.dll"><ExportData>"</ExportData>
> </Export>
>
> Is there a way to set the value and preserve the CDATA section when I
> select
> it?



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