XML Code Formatting

General Guidelines

  • Use two spaces instead of tabs.
  • Save your files as UTF-8.
  • Use UTF-8 for the content.
  • The max line length is 120 characters. If a line exceeds 120 characters, it will need to be wrapped.

  • Be careful with Eclipse XML auto-formatting with linewrapping and binary data.

Example

<?xml version="1.0" encoding="UTF-8"?>
<!-- My comment -->
<person gender="male">
  <fistname>John</firstname>
  <lastname>Doe</lastname>
</person>

XML Formatters

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close
    Back