Hi all,
I have a XML, that is working fine with XmlToRecordList except for this little piece:
<informacao_economica> <justificacao /> <sem_info_financeira>False</sem_info_financeira> <imobilizacoes_incorporeas> <valor>210</valor> <valor>10</valor> <valor>10</valor> </imobilizacoes_incorporeas><previsionais>False</previsionais><reais>False</reais></informacao_economica>
It's the "imobilizacoes_incorporeas" part that is giving me issues.
I made a structure for "informacao_economica":
justificacao - Textsem_info_financeira - Booleanprevisionais - Booleanreais - Boolean
but i cannot seem to get the structure/attribute right for "imobilizacoes_incorporeas".
Can you guys help me with that?
Regards,
Abílio Matos
Hi Abílio, it is working right now, assuming you are using version 1.6.2 of XML Records. See oml attached. I don't know why but renaming the structure containing the attribute valor to valor solved the problem.
My suspicion is that whenever you have a list of elements in the XML that don't contain any child elements, as is the case of the list of valor elements (each valor element does not have any child elements) you need to define a structure whose name is the same name as the one of the attribute in it. I would need to dive into the C# code to check whether this suspicion can be confirmed.
Hope this helps!
Greetings, pedro
Hi Abílio, you could define a structure that contains one single attribute, namely valor of type Integer. Say you name this structure Imobilizacao_incorporea. Then you can add the attribute imobilizações_incorporeas to the structure informacao_economica and define it as a list of Imobilizacao_incorporea. This should work.
Cheers, pedro
Hi Pedro,
Thank you for your answer but that only brings the first "valor" of the list.
Abilio Matos
Hi Abílio, can you upload the espace in here so that we can take a look? Make sure that any confidential information is not present in the espace. Could you also state the version of the platform server you are using?
I am using the ServiceStudio version 10.0.715.0 with personal environment, which is on 10.0.702.0.
The .OML is attached to this post.
Thanks again for your help.
Pedro,
Thank you very much. That solved the problem.
You're welcome. Nice programming!