# LCOV -\> Cobertura format conversion

**URL:** <https://discourse.julialang.org/t/lcov-cobertura-format-conversion/93200>\
**Category:** General Usage\
**Tags:** question, ezxml\
**Created:** [January 19, 2023, 8:44am UTC](https://discourse.julialang.org/t/lcov-cobertura-format-conversion/93200 "2023-01-19T08:44:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [January 19, 2023, 8:44am UTC](https://discourse.julialang.org/t/lcov-cobertura-format-conversion/93200/1 "2023-01-19T08:44:07Z")

</div>

Hi all, I’ve been trying to figure how to show coverage results on a GitLab hosted project generated using [Coverage.jl](https://github.com/JuliaCI/Coverage.jl).

I found that [LocalCoverage.jl](https://github.com/JuliaCI/LocalCoverage.jl) provides a way to convert the LCOV file to a Cobertura XML file readable by GitLab, but through the [lcov-cobertura](https://github.com/eriwen/lcov-to-cobertura-xml) python package.

I was not very fond of that solution so I took it on myself to write an naive equivalent in julia based on EzXML.jl, Dates (for the timestamp) and OrderedCollections.jl

I managed to obtain quite equivalent results (again with a naive approach) except one thing.  
I could not add a `DOCTYPE` node to my XML file. it seems the type exists in EzXML but there does not seem to be any constructor available, see [Constructors - EzXML](https://juliaio.github.io/EzXML.jl/latest/reference/#Constructors-1). Is it so or did I miss something (I am very new to using XML).

The end goal is either to make a package out of it, or more likely if the maintainers are open to this, to merge this bit of code into LocalCoverage, see this [proposal](https://github.com/JuliaCI/LocalCoverage.jl/issues/41).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 19, 2023, 8:53am UTC](https://discourse.julialang.org/t/lcov-cobertura-format-conversion/93200/2 "2023-01-19T08:53:34Z")

</div>

As I said in the issue, a PR is welcome.

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [January 19, 2023, 5:08pm UTC](https://discourse.julialang.org/t/lcov-cobertura-format-conversion/93200/3 "2023-01-19T17:08:27Z")

</div>

Ok forget about my question document type definition is referred to as DTD I overlooked that tiny little detail, my bad ! One should always read the first line !
