Case conventions on element names?

前端 未结 10 1735
予麋鹿
予麋鹿 2020-12-02 18:00

Are there any formal recommendations on element casing in XML?

I know XHTML uses lowercase element names (as opposed to HTML which canonically uses uppercas

10条回答
  •  死守一世寂寞
    2020-12-02 18:20

    To add to Metro Smurf's answer.

    The National Information Exchange Model (NIEM: http://en.wikipedia.org/wiki/National_Information_Exchange_Model) says to use:

    • Upper CamelCase (PascalCase) for elements.
    • (lower) camelCase for attributes.

    The NIEM makes for a good option when you're looking to conform to some standard.

提交回复
热议问题