Jonathan Sachs - 2015-07-15

I'm writing a utility that analyzes the XML files generated by Doxygen (v1.8.7) and reports information about the status of the project.

I've been asked to make the utility display the title of each page it reports on, as shown in a browser's display of the page's HTML file. In the HTML file, this title appears in a

tag. In the XML file, it doesn't appear at all.

I'm looking for advice from Doxygen experts on the best way to get a page's title. I can think of two approaches.

  1. When I process each XML file, read and parse the corresponding HTML file and look for a

    tag.

  2. Get the information from the same source as Doxygen does.

Knowing what approach #1 would involve, I expected approach #2 to be easier. Now that I've investigated it, though, #2 seems to be way more complex.

The titles are defined by \defgroup commands, some of which are in the project's .h files and some of which are in a single .txt file included in the Doxygen config file's INPUT command. For example, if the HTML page generated from xyz_color_defs.h has the title "XYZ Color Definitions," the command:

\defgroup xyz_color_defs XYZ Color Definitions

appears either in xyz_color_defs.h or in the .txt file.

Based on this, I believe I'd have to:

  read and parse the Doxygen config file;
  for each file listed in the INPUT command {
     read the file;
     parse the file (at least enough to identify C comments);
     for each @defgroup in the file's comments {
        add the @defgroup to a dictionary;
     }
  for each xml file Doxygen generated {
     look up the filename in the dictionary;
     if the filename was found
        use the entry's value as the page's title;
     else
        use the filename as the page's title;
     }

I've got three questions for any Doxygen experts out there who can help:

  1. Is there a third approach to the problem that would be easier than approach #1, instead of harder?

  2. If not, have I correctly understood what I need to do to implement approach #2? Is there a simpler way? And,

  3. Have I made any unwarranted assumptions that are likely to come back and bite me? For example, in approach 1, that there's not necessarily a 1:1 correspondence between the HTML and XML files that Doxygen generates?


This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.