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

  • Home
  • SEARCH
  • 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 8506519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:36:48+00:00 2026-06-11T02:36:48+00:00

XML 1.1 versus 1.0 Given that certain characters in 1.0 are no longer accepted

  • 0

XML 1.1 versus 1.0

Given that certain characters in 1.0 are no longer accepted in 1.1, which is the correct way to set Text on an xml element?

if Element e = new Element(“foo”)

Should I do this:

e.setText(sanitized_text_illegal_characters_removed_or_escaped) ?

or

e.setText(any_text)

  • 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-11T02:36:50+00:00Added an answer on June 11, 2026 at 2:36 am

    You’ve got it backwards: XML 1.1 relaxed the character limitations. Whereas XML 1.0 does not permit most of the ASCII control characters, XML 1.1 permits all control characters other than NUL (both prohibit surrogates).

    If you have to deal with strings that contain prohibited characters, you have two choices: escape them using an application-dependent scheme, or remove them. Note that you can not use an XML character reference (aka numeric entity) to “escape” the values; the parser will translate these references and reject them.

    However, before you go to the trouble of doing this, you should verify that you actually have to.

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

Sidebar

Related Questions

Has anyone seen or compiled benchmarks comparing declarative (XML) versus programmatically created UI's in
XML document: <?xml version=1.0 encoding=UTF-8?> <ProcessData> <SOAPAction>urn:echo</SOAPAction> <Content_Type>text/xml;charset=UTF-8</Content_Type> <uname>sarah_brcm</uname> <pwd>BRCM_UVLwNhjrA5fbgqkUNdxQXMfcCDJ</pwd> </ProcessData> XSLT: <?xml version=1.0
xml is not encoding proper - any help List<NameValuePair> formparams = new ArrayList<NameValuePair>(); formparams.add(new
XML File Sample <GateDocument> <GateDocumentFeatures> ... </GateDocumentFeatures> <TextWithNodes> <Node id=0/> MESSAGE SET <Node id=19/>
XML Data: <configs> <config> <name>XP</name> <browser>IE</browser> <browser>FF</browser> <browser>Chrome</browser> </config> </configs> I'm new to Ruby,
xml.append(<alertDesc>); xml.append(desc); xml.append(</alertDesc>); response.getWriter().write(xml.toString()); response.setContentType(text/xml); response.setHeader(Cache-Control, no-cache); xml is a StringBuffer object. I have
XML Schema specifies occurrence indicators (maxOccurrence, minOccurrence). Is there a best practice in which
XML: <A><B></B></A> or <A></A> I want to get all A nodes that do not
I have a string that may contain XML and normal string. I need to
xml: <root> <element>value (something)</element> </root> I need to unmarshall this xml to two different

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.