Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OPENXML and whitespace
Message
De
07/02/2002 15:53:16
 
 
À
05/02/2002 17:27:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00615480
Message ID:
00616987
Vues:
25
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 = '

SO ME
DATA ]]>

'

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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform