I would like to know if there are any xml coding standards.
<?xml version="1.0"?>
<overlay id="tutorboy-toolbar-Overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbox id="navigator-toolbox">
<toolbar id="tutorboy-toolbar-Toolbar"
toolbarname="TutorBoy Toolbar"
accesskey="T"
class="chromeclass-toolbar"
context="toolbar-context-menu"
hidden="false"
persist="hidden">
<toolbarbutton label="TutorBoy"
id="tutorboy-toolbar-button-home"
accesskey="d"
image="chrome://tutorboy-toolbar/skin/logo.png"
oncommand="loadURL('http://tutorboy.com');"
tooltiptext="Click here to go to the Tutorboy.com homepage." />
is this way of arrangement allowed?
Like Hypertext Markup Language (HTML), which is also based on the SGML standard, XML documents are stored as American Standard Code for Information Interchange (ASCII) files and can be edited using any text editor.
What is XML? XML stands for extensible markup language. A markup language is a set of codes, or tags, that describes the text in a digital document. The most famous markup language is hypertext markup language (HTML), which is used to format Web pages.
No, the indentation does not matter in XML documents.
The W3C defines an XML specification recommendation: http://www.w3.org/TR/REC-xml/
Since you've narrowed your question to XML formatting, there's no "universal" answer to how your XML should be formatted. Beyond conforming to whatever DTD or schema you happen to be dealing with, the importance of particular spacing/indentation of your tags lies with the people who will be dealing with your data.
If you're creating XML data to be sent across a network as part of a web service or some sort, then generally you're going to want to eliminate any unnecessary whitespace before transfer in order to optimize your data transfer rate. This means no line breaks, no indentation, no comments.
If your creating an XML document that others will be reading/modifying on a regular basis, then obviously you'll want to put some consideration into keeping the document readable. What constitutes "readable" is determined by everyone involved on that particular team or project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With