5

I'm writing an application that produces a couple of XML files. In the files, some of the tags have attributes. I'd like to know if the order of the attributes is important, or it's the same.

For instance, this output:

<person first='john' last='doe'>

Is the same as this:

<person last="doe" first="john">
Daniel
  • 8,794
  • 4
  • 48
  • 71
  • 1
    The proper term is "attributes" rather than "parameters". I think you would get more search hits if you use that. – matli Nov 16 '15 at 23:07

1 Answers1

13

According to the XML specification, it is not important.

the order of attribute specifications in a start-tag or empty-element tag is not significant

See section 3.1 in the specification available here: http://www.w3.org/TR/REC-xml/

matli
  • 27,922
  • 6
  • 37
  • 37