1

I have a question!

I already have some code, which is being auto-documented by Doxygen. In addition, I want to add a rather long mainpage to this documentation. The page I want to include is in XML, like this page, for example. I know Doxygen supports only a handful of popular tags and not the rest. So how can I embed an xml page into my documentation's mainpage, or convert it to a dox file that uses doxygen special commands?

Thanks in advance!

Subhamoy S.
  • 6,566
  • 10
  • 37
  • 53

1 Answers1

1

Try using the \htmlinclude command. To incorporate the page you link to in your question I saved the source of the page as dox.xml, placed it in the same directory as a minimal test source file and included the following in the source file:

/**
  \mainpage
  \htmlinclude dox.xml
*/

I also had to add the current directory to the EXAMPLE_PATH field of the configuration file since this is where \htmlinclude (and \verbinclude, another useful command) searches for files to include.

There are a number of useful related questions and answers on this site, including:

Add XML file to the file list

Is there a way to embed <script> content into a Doxygen \mainpage section?

How to include custom files in Doxygen

albert
  • 8,285
  • 3
  • 19
  • 32
Chris
  • 44,602
  • 16
  • 137
  • 156
  • Thank you for the answer! I later realized that if I took that approach, and generated LaTeX or PDF out of Doxygen, things would not show up properly, so I had to make a parser that would convert xml tags to doxygen special commands. But if I generate HTML only, then this method still works, with some colour coding missing, e.g., in `` tags. – Subhamoy S. Apr 16 '12 at 08:24