# Using LightXML I error out when using "free(xdoc)" in Atom, but not in terminal?

**URL:** https://discourse.julialang.org/t/using-lightxml-i-error-out-when-using-free-xdoc-in-atom-but-not-in-terminal/46075
**Category:** New to Julia
**Created:** [September 4, 2020, 8:00pm UTC](https://discourse.julialang.org/t/using-lightxml-i-error-out-when-using-free-xdoc-in-atom-but-not-in-terminal/46075 "2020-09-04T20:00:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)
#### Post date: [September 4, 2020, 8:00pm UTC](https://discourse.julialang.org/t/using-lightxml-i-error-out-when-using-free-xdoc-in-atom-but-not-in-terminal/46075/1 "2020-09-04T20:00:36Z")

</div>

Hello!

I am trying to play around with making xml files. I have made this simple XML:

```julia
using LightXML

# create an empty XML document
xdoc = XMLDocument()

# create & attach a root node
xroot = create_root(xdoc, "case")

# create the first child
casedef = new_child(xroot, "casedef")
set_attribute(casedef,"requiredversion","v5.0.165")
execution = new_child(xroot, "execution")

constantsdef = new_child(casedef, "constantsdef")

mkconfig = new_child(casedef, "mkconfig")
set_attributes(mkconfig, Dict("boundcount"=>"241", "fluidcount"=>"2"))

geometry = new_child(casedef, "geometry")
motion = new_child(casedef, "motion")

# save to an XML file
save_file(xdoc, "f1.xml")

# output to a string
s = string(xdoc)

# print to the console (in a pretty format as in an XML file)
print(xdoc)

```

This is what it returns in the terminal in Atom

```julia
free(xdoc)
Ptr{Nothing} @0x0000000000000000
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x3db688c6 -- xmlAttrDumpOutput at /workspace/srcdir/libxml2-2.9.10\xmlsave.c:769

```

But when I do the same in the terminal:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/0/f024a0f7cc05328b2fb25db8398418db3e6b2f0e.png)  
It works perfectly fine.

Would anyone have an idea of why?

Kind regards
