Is a duplicate attribute name
The same attribute appears twice on one element.
The message, as .NET reports it
'id' is a duplicate attribute name. Line 1, position 14.
Why it happens
- XML built by string concatenation that adds an attribute again, or a template that sets it twice.
How to fix it
Keep one occurrence of the attribute.
.NET throws an XmlSchemaValidationException at the first schema error unless XmlReaderSettings.ValidationEventHandler is set, which then receives every one with its line and position. A well-formedness error is an XmlException and ends reading whatever the settings.
The same problem in xmlvalid
xmlvalid validates with libxml2, which reports it as Attribute redefined. It checks the whole document in your browser and lists every schema error with its line and column, not only the first.
Attribute id redefined
Example
Reports the error
<item id="1" id="2"/>
Fixed
<item id="1"/>