Building an XML [duplicate]
Which is the standarized way of writing an XML? is it
<MODEL_NUMBER></MODEL_NUMBER>
or
<MODELNUMBER></MODELNUMBER>
Thanks !
The answer to your question is:
(a) there is no standard
(b) there is not even any widespread agreement on conventions.
Most style guidelines I have read (e.g. http://www.w3schools.com/xml/xml_elements.asp) recommend using underscores between the two words in an element tag if it improves readability. So casing aside, the most readable would be:
<model_number></model_number>
This similar question shows a few options. I personally prefer ProperCase and camelCase, mostly because I don't like typing underscores, due to my less than perfect typing skills. That's really more personal bias, and experience working with .NET, where ProperCase and camelCase are more prevalent.
Case conventions on element names?
Neither of these. By default, element names mustn't be in capital letters.
Maybe <model.number></model.number>
would be a solution.
精彩评论