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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:42:42+00:00 2026-06-06T07:42:42+00:00

Should numerical attributes in XML be quoted? <root> <node size=45 /> <foo bar=1.2> <baz

  • 0

Should numerical attributes in XML be quoted?

<root>
  <node size=45 />
  <foo bar=1.2>
    <baz foo=20>
  </foo>
</root>

vs.

<root>
  <node size="45" />
  <foo bar="1.2">
    <baz foo="20">
  </foo>
</root>

My code editor/browser seems fine without quotes, but most online resources seem to say they’re required.

  • 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-06T07:42:44+00:00Added an answer on June 6, 2026 at 7:42 am

    http://www.w3schools.com/xml/xml_attributes.asp

    XML Attributes Must be Quoted

    Attribute values must always be quoted. Either single or double quotes can be used. For a person’s sex, the person element can be written like this:

    <person sex="female">
    

    or like this:

    <person sex='female'>
    

    If the attribute value itself contains double quotes you can use single quotes, like in this example:

    <gangster name='George "Shotgun" Ziegler'>
    

    or you can use character entities:

    <gangster name="George &quot;Shotgun&quot; Ziegler">
    

    Updated to expand based on the newest comment, according the Microsoft universe at least.

    XElement.Value Property

    public string Value { get; set; }
    

    You can also see refer to this question as well

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

Sidebar

Related Questions

I have a source document with XML structure similar to this: <FOO> <BAR>x</BAR> <BAR>y</BAR>
I am writing a numerical code, in which I would like to use a
If I make sure only alpha-numerical characters are used in queries I should be
This seems like it should be prettty easy - but I just can't get
I should get ID from socket but this code is not giving the correct
I'm writing numerical code, in which it is useful to define vector operations. E.g
I have some Clojure code that is simulating and then processing numerical data. The
I am writing a numerical program that should be somewhat fast, and is also
What value in the SqlDbType enumeration should I use for the numeric T-SQL data
Should we declare the private fields as volatile if the instanced are used in

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.