tags:

views:

257

answers:

2
+1  Q: 

Is MXML valid XML?

I am just curious, in MXML many tags are capitalized(eg: < Label /> ). I know this is because the node name is in relation to the class name the node represents and by convention classes are capitalized. But one of the rules of XML is that all node names be lowercase. So does this mean MXML is invalid XML?

+6  A: 

It is not a rule of XML that node names must be lowercase; it is merely convention. Therefore MXML is still valid as XML.

XML is case-sensitive though, so <Lable /> is not the same element type as <lable />

Rowland Shaw
Thanks, I thought it was a rule.
John Isaacks
@John: the thing is that in XML names are case *sensitive*, so it's quite useful to be consistent. I'd guess that most people use all lowercase because XHTML's elements are all lowercase. Could be the other way around...
Steve Jessop
@onebyone -- Good point, have added this clarification to the answer
Rowland Shaw
@John: also XML element names may be in scripts that don't even have a lower-case: <ﭗ懶갈ウ /> would also be a valid XML element.
Joachim Sauer
+1  A: 

XML is case sensitive, so <label/> is not equal to <Label/>, both are valid XML however.

Patrick McDonald