Your approach to writing documentation for XML files?

What is your approach to writing documentation explaining the options and use of XML files for a project ?

Do you write commented instructions directly in the XML file ?

Do you create a different text file in which you write instructions ?

Do you explain the use of blocks of XML or do you detail each element and it’s function ?

I am looking for some guidelines on how to write the documentation for large XML files that control the settings and content of projects.

Looking forward to your advices.