XML and CDATA

Associate
Joined
7 Jul 2003
Posts
1,724
Location
oh I do like to be beside the seaside
Which is these is the correct use of CDATA in XML?

Code:
<![CDATA[<AddressLine1>1 Arcacia Avenue</AddressLine1>]]>

or

Code:
<AddressLine1><![CDATA[1 Arcacia Avenue]]></AddressLine1>

I'm thinking it's the 2nd one as the tags are outside of the CDATA, whereas in the first one the tags are inside and so will just be treated as text

Thanks.
 
Back
Top Bottom