473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

line end handling in CDATA section

I've read the XML standard, and I wonder if someone can confirm this
for me.

Am I right in thinking that line endings are translated even within
CDATA sections? The standard states that translation occurs before
parsing so this appears to be the case.

Jan 29 '07 #1
2 1655
Spacen Jasset wrote:
Am I right in thinking that line endings are translated even within
CDATA sections? The standard states that translation occurs before
parsing so this appears to be the case.
That's how I'm reading it. CDATA sections are something of a minor
abomination anyway; it's generally better to use character-by-character
escaping where needed. (Or, if you're trying to pass a block of binary
data, to encode it as base-64 or something of that sort.)

CDATA Sections were provided to let people more easily cut-and-paste
some -- not all! -- non-XML data into XML documents. But these days,
given decent XML editing tools which automate the escaping task, there's
really very little need for the <![[CDATA[]]kluge. The one exception
is working with tools that don't support XML properly, and I would
advise beating up the authors of those tools to get them fixed.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jan 29 '07 #2
In article <11**********************@a34g2000cwb.googlegroups .com>,
Spacen Jasset <jm********@gmail.comwrote:
>Am I right in thinking that line endings are translated even within
CDATA sections? The standard states that translation occurs before
parsing so this appears to be the case.
Yes. The idea is that you get the same results whatever line-ending
convention your system uses. If you want to force a particular
character, you have to use a character reference.

-- Richard

--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Jan 29 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Xah Lee | last post by:
what does it mean when a style tag gives something like the following? <style type="text/css" media="screen,projection">/*<!]>*/</style> is this standard? Xah xah@xahlee.org ∑...
6
by: Cade Perkins | last post by:
How can the CDATA ending delimiter "]]>" be represented within a CDATA section itself? Consider an XML document that is intended to contain an embedded, uninterpreted XML example. Generally,...
10
by: Jon Noring | last post by:
Out of curiosity, may a CDATA section appear within an attribute value with datatype CDATA? And if so, how about other attribute value datatypes which accept the XML markup characters? To me,...
10
by: Simon Brooke | last post by:
Here's my problem: <xsl:template match="/category"> .... <script type="text/javascript"> &lt;!]&gt; </script> .... </xsl:template>
11
by: ericms | last post by:
Can anybody show me how to insert a CDATA section using XPathNavigator ? I have tried the follwing with no luck: XmlDocument docNav = new XmlDocument(); docNav.LoadXml(xmlString);...
2
by: Steveino | last post by:
Hello, Just wondering if anyone could shed any light on this, it's probably me just being silly... I have a dataset that I've used to create an XmlDataDocument, in order to apply XSL. The XSL...
1
by: soccerdad | last post by:
I've got a class hierarchy generated from a .xsd schema file using the XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA block. The XSD.EXE tool exposed a "Value" property...
2
by: Pugi! | last post by:
Using AJAX I want to send some information from the server (php-page) as XML to the client. The contents can be very divers so I have to use XML instead of text. On one occasion the contents is...
1
!NoItAll
by: !NoItAll | last post by:
The MSXML parser is choking on a single character that often appears in my data within a CDATA section. Try this: Dim bRet As Boolean Dim lRet as long Dim xmlDoc As MSXML2.DOMDocument Set...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.