Can I add an additional attribute to the xml declaration (first line) of an xml file?

85 Views Asked by At

Is it legal xml syntax to add an additional attribute (to indicate a file-type, for instance) to the xml declaration at the top of an xml file?

(See, e.g., What is on the first line of an XML document?)

1

There are 1 best solutions below

0
Joshua Goldberg On

It took me a bit of digging to verify that the answer is NO: According to the specification, the xml declaration can only include the xml version, encoding, and standalone document declaration.