Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

max cdata size?

Posted on 2006-06-29
4
Medium Priority
?
2,251 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

660 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