Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

max cdata size?

Posted on 2006-06-29
4
Medium Priority
?
2,279 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
  • 2
  • 2
4 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Screencast - Getting to Know the Pipeline

916 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