Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 772447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:48:17+00:00 2026-05-14T18:48:17+00:00

I often find this strange CDATA tag in XML files: <![CDATA[some stuff]]> I have

  • 0

I often find this strange CDATA tag in XML files:

<![CDATA[some stuff]]>

I have observed that this CDATA tag always comes at the beginning, and then followed by some stuff.

But sometimes it is used, sometimes it is not. I assume it is to mark that some stuff is the “data” that will be inserted after that. But what kind of data is some stuff? Isn’t anything I write in XML tags some sort of data?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:48:17+00:00Added an answer on May 14, 2026 at 6:48 pm

    CDATA stands for Character Data and it means that the data in between these strings includes data that could be interpreted as XML markup, but should not be.

    The key differences between CDATA and comments are:

    • As Richard points out, CDATA is still part of the document, while a comment is not.
    • In CDATA you cannot include the string ]]> (CDEnd), while in a comment -- is invalid.
    • Parameter Entity references are not recognized inside of comments.

    This means given these four snippets of XML from one well-formed document:

    <!ENTITY MyParamEntity "Has been expanded">
    

    <!--
    Within this comment I can use ]]>
    and other reserved characters like <
    &, ', and ", but %MyParamEntity; will not be expanded
    (if I retrieve the text of this node it will contain
    %MyParamEntity; and not "Has been expanded")
    and I can't place two dashes next to each other.
    -->
    

    <![CDATA[
    Within this Character Data block I can
    use double dashes as much as I want (along with <, &, ', and ")
    *and* %MyParamEntity; will be expanded to the text
    "Has been expanded" ... however, I can't use
    the CEND sequence. If I need to use CEND I must escape one of the
    brackets or the greater-than sign using concatenated CDATA sections.
    ]]>
    

    <description>An example of escaped CENDs</description>
    <!-- This text contains a CEND ]]> -->
    <!-- In this first case we put the ]] at the end of the first CDATA block
         and the > in the second CDATA block -->
    <data><![CDATA[This text contains a CEND ]]]]><![CDATA[>]]></data>
    <!-- In this second case we put a ] at the end of the first CDATA block
         and the ]> in the second CDATA block -->
    <alternative><![CDATA[This text contains a CEND ]]]><![CDATA[]>]]></alternative>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often find I want to write code something like this in C#, but
I often find myself writing a property that is evaluated lazily. Something like: if
While creating classes in Java I often find myself creating instance-level collections that I
I just noticed a strange behavior with overload resolution. Assume that I have the
I often find myself using Integers to represent values in different spaces. For example...
I often find linq being problematic when working with custom collection object. They are
I often find myself confused with how the terms 'arguments' and 'parameters' are used.
I often find the need to do something along these lines: public class OperationResult
I seem to often find myself wanting to store data of more than one
As a UI guy (coding and designing user interfaces) I often find myself in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.