How do I comment attributes inside an XML tag?

No, this isn’t possible. Comments are not allowed in an XML open tag. Depending on your application, you might get away with “commenting out” the attributes by prefixing their names with “_”, or you might not (if the XML is validated against a schema or all attributes are parsed). Because whitespace is allowed, and most editors support line operations, you can “comment” multiple attributes easily this way:

<element
   _attr1="value1"
   _attr2="value2"
   _attr3="value3"
>

But these attributes are still part of the document.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)