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 9179441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:47:49+00:00 2026-06-17T17:47:49+00:00

How can I put an & symbol in an attribute of an XML tag

  • 0

How can I put an & symbol in an attribute of an XML tag while keeping the XML valid?

<?xml version="1.0" ?> 
<a text="b&c"/>

When I use W3School’s validator, I get the error:

EntityRef: expecting ‘;‘

  • 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-17T17:47:51+00:00Added an answer on June 17, 2026 at 5:47 pm

    Use a character reference to represent it: &amp;

    See the specification:

    The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.

    If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings ”
    &amp;
    ” and ”
    &lt;
    ” respectively. The right angle bracket (>) may be represented using the string ”
    &gt;
    “, and MUST, for compatibility, be escaped using either ”
    &gt;
    ” or a character reference when it appears in the string ”
    ]]>
    ” in content, when that string is not marking the end of a CDATA section.

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

Sidebar

Related Questions

Can some body tell me the reason why we usually put const and &
If I integrate between CKEditor && CKFinder I can put a browse server button
TL;DR Summary: Can I configure MVC Web API routing for HTTP GET, PUT &
I can put python doctests in the bodies of each function, which I sometimes
We can put our file say one.txt in txt folder available in tomcat->webapp folder.
In XAML we can put one long string in the positions property, How do
how i can put multiple buttons in scroll view with according to my requirement?
In C++ you can put a member in a base class and a member
I know I can put escaped HTML tags in string resources. However, looking at
Where are all of the places you can put CSS style information on an

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.