Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8772671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:05:34+00:00 2026-06-13T18:05:34+00:00

The XML specification states that this has to be the behaviour for handling any

  • 0

The XML specification states that this has to be the behaviour for handling any “external parsed entity”. But this applies to CDATA sections inside of an element as well? Why?
Is there any way to get \r unconverted by adding 1/2 conditions in parser code, instead of changing \r to 

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:05:36+00:00Added an answer on June 13, 2026 at 6:05 pm

    This is indeed the case. Why? It is to simplify the life of the applications that will process the output from the XML file – they simply do not need to worry in which format the newlines are, increasing application compatibility (consider compatibility of simple text editors between Linux and Windows – they almost always display the files incorrectly, in Windows most often as a single line).

    Of course, if you, for any reason, require having \r unconverted, it is simple to take any existing XML parser implementation and modify it. In tinyxml, you need to modify the TiXmlBase::ReadText() function, or you can grab an older version of it, as it used to leave whitespace intact.

    On the other hand, from the design point of view, it would be much cleaner to just run parser output through character replacement function and replace all the “\n” to “\r\n”.

    Of course the best would be to just use the output as is, right now I can’t imagine any scenario where this would be needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Unfortunately the specification does not tell anything about precision. The xml scheme definition states
I have an XML element that looks something like this: <content locale=en> </content> The
The specification of XML Namespaces explains that the interpretation of unprefixed attributes is determined
Is this one a valid XML instance? It has nothing between the the XML
From my understanding a .wsdl file consists of an xml specification. This abstract way
I'm using SoapClient, trying to produce something for this specification: <?xml version=1.0 encoding=utf-8?> <soap:Envelope
I'm using a DocumentBuilder to parse XML files. However, the specification for the project
xml is not encoding proper - any help List<NameValuePair> formparams = new ArrayList<NameValuePair>(); formparams.add(new
Suppose my Tomcat webapps directory looks like this: webapps/ webapps/fooapp/ webapps/fooapp/WEB-INF/ webapps/fooapp/WEB-INF/web.xml webapps/fooapp/bardir/ When
Does anyone know where I can get a canonical XML document that uses every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.