Solved

max cdata size?

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

20 Experts available now in Live!

Get 1:1 Help Now