Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OPENXML and whitespace
Message
 
 
To
07/02/2002 15:53:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00615480
Message ID:
00616994
Views:
21
>In case you're interested, one answer to this (although not the most straightforward IMO) is to wrap a CDATA tag around all elements where spacing matters. Therefore, to get your example to work, the following would work:
>DECLARE @xml nvarchar(4000)
>DECLARE @h int
>SET @xml = '
><root>
>	<row id="1"><![CDATA[  THIS IS
>SO         ME
>DATA   ]]></row>
></root>'
>
>EXECUTE sp_xml_preparedocument @h output, @xml
>
>SELECT * FROM OPENXML(@h, '//row') WITH (id int '@id', note nvarchar(2000) 'text()')
>
>execute sp_xml_removedocument @h
You can use < pre > tag to preserve formatting and XML/HTML tags.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform