Solved

max cdata size?

Posted on 2006-06-29
4
2,184 Views
Last Modified: 2008-03-03
is there a limit for what a cdata contains in an xml?
if yes what is that limit?

thanks.
A.
0
Comment
Question by:Agarici
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 17011009
Hi Agarici,

There is no limit to the maximum size of a CDATA section in the XML recommendation.
Some processors or parsers have string length limitations and could store the CDATA textnode in one string
so depending on the parser and platform you use, the length could be limited
I would expect this to be documented with the parser though

Cheers!
0
 
LVL 11

Author Comment

by:Agarici
ID: 17011055
hi Gertone,
thanks for the reply,

do you know anything about how mozilla handles this problem? i am using a mozilla java script engine (spider monkey)

thanks,
A.
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 17011151
no,

but you would be looking for how the XML object used would store the CDATA as a node (or potentially multiple text nodes)

note that your limitation will likely not be the CDATA.
CDATA is pretty cheap to store compared to nested elements,
because it could be a simple one node(linear)
where as multiple nested nodes would have quite some indexing and referencing stored as well
so for the same # megabytes a CDATA section would be relatively cheap
.... and you don't want to send many megabytes to a browser, do you...

where does this question come from,
are you just cautious, or did you hit a wall somewhere?

cheers
0
 
LVL 11

Author Comment

by:Agarici
ID: 17016221
it is not just being cautious, i run into a problem...
i am executing a javascript (which is downloading a web page) with the mozilla engine, and it gives me some error if the page is larger than 64k... well actually the error seems to be from some processing made after the page is downloaded. and is not very sugestive... it is just saying that a sever error has happened.

i asked about the cdata because the downloaded page is stored into a cdata for later use

i'm pretty new to this code so i'll have to do a "litle" more research.

anyway, thanks for the help, i have just eliminated one possible cause for my error.

ty,
A.
0

Featured Post

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question