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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top