Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 54c3baa

Browse files
fixes MicrosoftDocs/sql-docs/issues/4723 -- < for &lt;
1 parent 88e3aaf commit 54c3baa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/t-sql/xml/insert-xml-dml.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ GO
205205
```
206206

207207
### F. Inserting data using a CDATA section
208-
When you insert text that includes characters that are not valid in XML, such as < or >, you can use CDATA sections to insert the data as shown in the following query. The query specifies a CDATA section, but it is added as a text node with any invalid characters converted to entities. For example, '<' is saved as &lt;.
208+
When you insert text that includes characters that are not valid in XML, such as < or >, you can use CDATA sections to insert the data as shown in the following query. The query specifies a CDATA section, but it is added as a text node with any invalid characters converted to entities. For example, '<' is saved as '\&lt;'.
209209

210210
```
211211
USE AdventureWorks;
@@ -219,7 +219,7 @@ SET @myDoc =
219219
</Root>' ;
220220
SELECT @myDoc ;
221221
SET @myDoc.modify('
222-
insert <![CDATA[ <notxml> as text </notxml> or cdata ]]>
222+
insert <![CDATA[ &lt;notxml&gt; as text &lt;/notxml&gt; or cdata ]]>
223223
into (/Root/ProductDescription/Features)[1] ') ;
224224
SELECT @myDoc ;
225225
GO

0 commit comments

Comments
 (0)