Closed szafna closed 3 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.88. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Thanks for reporting this. I need to debug the issue.
@szafna
You need to specify the component name whenever it is defined using another @aml
.
~
is only useful when the julia name is the same as XML name.
The following works fine:
using AcuteML
@aml mutable struct inner "~"
id1::Int, att"~"
desc1::String, "~"
end
@aml mutable struct outer doc"outer"
id2::Int, att"~"
innerList::Vector{inner}, "inner" # <--- notice this
end
i1 = inner(id1 = 1, desc1 = "desc1")
i2 = inner(id1 = 2, desc1 = "desc2")
o1 = outer(id2 = 3, innerList = [i1, i2])
pprint(o1)
pprint("./o1.xml", o1)
xml = readxml("./o1.xml")
o2 = outer(xml)
I added more information to the simple example to prevent confusion.
Thx. It is working.
Hi, I have this simple MWE:
Written xml file looks correct. However extracting results in error:
I checked example in documentation (it works ), however this one not. No idea what else to check.
Simon