IT Community - Software Programming, Web Development and Technical Support

CDATA Section in XML

This is a discussion on CDATA Section in XML within the XML and SOAP forums, part of the Web Development category; Hi Guys can any one help me out in the CDATA section in XML?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > XML and SOAP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-30-2007, 06:30 AM
vigneshgets vigneshgets is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 904
vigneshgets is on a distinguished road
Post CDATA Section in XML

Hi Guys can any one help me out in the CDATA section in XML?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-30-2007, 12:00 PM
shanmugamit shanmugamit is offline
D-Web Trainee
 
Join Date: Mar 2007
Posts: 10
shanmugamit is on a distinguished road
Smile Re: CDATA Section in XML

hi,
CDATA
Everything inside a CDATA section is ignored by the parser.

If your text contains a lot of "<" or "&" characters - as program code often does - the XML element can be defined as a CDATA section.

A CDATA section starts with "<![CDATA[" and ends with "]]>":

<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
{
return 1
}
else
{
return 0
}
}
]]>
</script>

In the example above, everything inside the CDATA section is ignored by the parser.

Notes on CDATA sections:
A CDATA section cannot contain the string "]]>", therefore, nested CDATA sections are not allowed.

Also make sure there are no spaces or line breaks inside the "]]>" string.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Analytical Writing section anbuchezhians Software Testing 2 08-10-2007 12:37 AM
How to write contents as CDATA in XML using c#? Archer C# Programming 0 07-17-2007 10:57 PM
Cdata raj XML and SOAP 0 07-17-2007 12:11 AM
Article Section? Karpagarajan Discussweb HQ 2 04-05-2007 02:57 AM


All times are GMT -7. The time now is 10:45 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0