0

I have a C program with countless source files, and I've run Doxygen on it producing HTML. Next I want to generate some C code based on what I find in the HTML.

I've created a script with Mojo::Dom. I can extract much of the information I want from the file, but I don't see a good way to follow links to load additional HTML files I'm interested in. In code like this:

<p>
&nbsp;
<p>
<h3><a class="anchor" name="index_v">- v -</a></h3><ul>
<li>VarName1
: <a class="el" href="source1_8c.html#f8724fb54bfdf8ce9871043027ba1032">source1.c</a>
<li>VarName2
: <a class="el" href="source1_8c.html#6d7c65255b62c7394c75bee4895e465c">source1.c</a>
...

What is a simple, clean way to load source1_8c.html? More specifically the parts referred to by the hrefs?

I'm trying to avoid using perl regex since I expect to find a higher level of support for what I want. But I will if I need to.

Thanks!

1 Answers1

0

If the href points to a local file, then use Mojo::Util::slurp to read in the file, then create a Mojo::DOM object out of it.

Joel Berger
  • 20,180
  • 5
  • 49
  • 104