# LightXML vs EzXML

**URL:** https://discourse.julialang.org/t/lightxml-vs-ezxml/61091
**Category:** General Usage
**Created:** [May 13, 2021, 3:17pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091 "2021-05-13T15:17:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![gitboy16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gitboy16/32/24906_2.png) [@gitboy16](https://discourse.julialang.org/u/gitboy16)
#### Post date: [May 13, 2021, 3:17pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/1 "2021-05-13T15:17:33Z")

</div>

Hi,  
I have started playing with LightXML and EzXML.  
I found EzXML to be easier to use and better documented than LightXML. I am still struggling to do some basic stuff wiyh LightXML. I wanted to have the view of the community on which package I should use with regards to long term solution and maintainability.  
Thank you

---

<div class="post-metadata">

### Author: ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)
#### Post date: [May 13, 2021, 5:42pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/2 "2021-05-13T17:42:59Z")

</div>

I like EzXML, though it hasn’t received much maintenance in a while. However, the [EzXML repository](https://github.com/JuliaIO/EzXML.jl) was recently transferred to the JuliaIO Github group, so it should be easier to make updates for anyone who is interested in contributing.

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [May 13, 2021, 5:53pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/3 "2021-05-13T17:53:34Z")

</div>

I have no insights about the relative merits since I’ve never used EzXML but if you use LightXML you must be careful with memory management of XML objects. Cf [Use a finalizer instead of manual memory management · Issue #93 · JuliaIO/LightXML.jl · GitHub](https://github.com/JuliaIO/LightXML.jl/issues/93).

---

<div class="post-metadata">

### Author: ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)
#### Post date: [May 13, 2021, 9:18pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/4 "2021-05-13T21:18:27Z")

</div>

If you want something super simple and intuitive I recommend [GitHub - JuliaCloud/XMLDict.jl: XMLDict implements a simple Associative interface for XML documents.](https://github.com/JuliaCloud/XMLDict.jl)

---

<div class="post-metadata">

### Author: ![gitboy16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gitboy16/32/24906_2.png) [@gitboy16](https://discourse.julialang.org/u/gitboy16)
#### Post date: [May 13, 2021, 9:32pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/5 "2021-05-13T21:32:31Z")

</div>

Seems XMLDict.jl is build on top of EzXML. For me, usually, the less dependencies the better…

---

<div class="post-metadata">

### Author: ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)
#### Post date: [May 13, 2021, 9:52pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/6 "2021-05-13T21:52:27Z")

</div>

I think actually XMLDict makes you less dependent, than directly using EzXML. Because it is only 300loc and defines a very nice interface, with an EzXML backend that could easily be switched. If one directly depends on EzXML and that package disappears for some reason, I expect a greater pain.

---

<div class="post-metadata">

### Author: ![D\_A](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@D\_A](https://discourse.julialang.org/u/D_A)
#### Post date: [May 13, 2021, 10:31pm UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/7 "2021-05-13T22:31:17Z")

</div>

I usually use both: EzXML to read and extract (it includes XPath paths) and LightXML to generate (because there is a [bug](https://github.com/JuliaIO/EzXML.jl/issues/138) with EzXML for adjacent text nodes, and my skills are too limited to fix it myself).

For XSL transformations, I use a third party executable.

---

<div class="post-metadata">

### Author: ![henry2004y](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henry2004y/32/9284_2.png) [@henry2004y](https://discourse.julialang.org/u/henry2004y)
#### Post date: [September 14, 2021, 10:48am UTC](https://discourse.julialang.org/t/lightxml-vs-ezxml/61091/8 "2021-09-14T10:48:13Z")

</div>

I made some comparisons within my package to see the differences. The results are shown [here](https://github.com/henry2004y/Vlasiator.jl/issues/29). My intermediate observations are:

1. LightXML is faster to compile.
2. EzXML consumes less memory.
3. EzXML is slightly faster in my small test, but slightly slower in my pkg benchmarks.

I need to look at my codes more carefully but so far I don’t see a big advantage by using either one except the memory deallocation issue mentioned above.
