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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:53:40+00:00 2026-06-13T16:53:40+00:00

While this has no impact, as far as I know, on processing the file,

  • 0

While this has no impact, as far as I know, on processing the file, I’ve always wondered what the conventional approach is to the use of spaces before the closing bracket of an element tag. I’ve seen hundreds if not thousands of XML documents in my time and have yet to see a real pattern.

So I would like to know which of the two following notations would be preferred, if such a consensus exists.

<element attribute1="value1" attribute2="value2">

<element attribute1="value1" attribute2="value2" >

I realise that this may be a trivial question, but it would help me reach some consistency in my XML documents. I’ve noticed that the documents I’ve created through the years tend to switch between these two styles. Whenever I create a new document, I usually end up wasting a minute on deciding which style to use, so I welcome input on what style I should finally settle on.

  • 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-13T16:53:41+00:00Added an answer on June 13, 2026 at 4:53 pm

    Don’t format XML manually.

    For example: http://www.xmltoolbox.com/

    Actually, don’t format any source code manually. Computers are great at repetitive tasks, and can format XML with 100% consistency. Decide on a style you like and program the computer to do it.

    That said, you rarely see <element attribute="value" > in XML documents. Most browsers, as another example, will cinch up the closing angle bracket for XHTML source.

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

Sidebar

Related Questions

This has bothered me for a while. I use `hi-lock' or more specifically highlight-symbol
While this question has been asked in a variety of contexts before, I can't
This has been frustrating me for a while now. I started developing a site
This has been annoying me for a while in several XCode projects. I really
This has been annoying me for a while yet the solution must be really
While I'm perfectly willing to believe that this has been asked elsewhere, I haven't
While I realize that this question has been asked once or twice ago but
This one has been stumping me for a while. But I'm no expert. This
This Jquery problem has been bugging me for a while now. I developed a
This is a question that has been bugging me for a while. I started

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.