I am trying to use the Jenkins Plot plugin to plot how many TODO markers we have in our code.
I have an XML file that is created as part of an assembly that includes data about them (among other things): each TODO token has a line in XML that looks like this:
<tag line="3" name="todo" description="Do something with this"/>
Using the standalone xpath tool, I can use the expression //tag[@name='todo'] to get all the matching elements or count(//tag[@name='todo']) to just get their number.
This counter is the value I want to build. However, I could not get the data on the chart in Jenkins.
I created a plot and indicated that it is an XML file. Jenkins then asks me if the result will be Nodeset, Node, String, Boolean or Number.
I assume that "Nodeset" applies to //tag[@name='todo'] and "Number" to count(//tag[@name='todo']) . But I tried them both, and both of them just gave me an empty graph, with no data plotted on it.
The most unpleasant of all is that Jenkins does not give me any feedback on what the problem is; just an empty graph. Nothing in the build log or anywhere else I see.
Can someone help me get this job? I cannot find examples anywhere. It seems like it should be simple, but it just is not for me.
Thanks in advance.
[EDIT]
Larger XML sample as indicated in the comments:
<?xml version="1.0" encoding="utf-8"?> <project> <method> <docblock> <tag line="763" name="todo" description="This needs doing"/> </docblock> </method> <method> <docblock> <tag line="14" name="todo" description="This also needs doing"/> </docblock> </method> </project>
(I cut out elements and attributes that are not relevant, but this is the main structure)
So, as far as I can tell, there is no XML namespace there.