Solved

max cdata size?

Posted on 2006-06-29
4
2,046 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 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now