Domanda

I have a python project that i am documenting with sphinx. The project reads in an xml configuration file. What is the best way to document this configuration file? Can i include an xml schema somehow? Or have a nice cascaded example? I know i can just type it out, but is there a better way to make it look pretty and easy to write/maintain?

All i have found is ways to include xml in the sphinx to change the structure etc.

I am looking for a way which is highly integrated and easy to use.

Thanks :D

È stato utile?

Soluzione

The answer to this question recommends using Sphinx's literalinclude directive.

This will allow you to include the literal content of the XML file which you could document with standard XML comment strings <!-- -->. The directive allows you to specify the language of the content which presumably affects final rendering.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top