[XML Records] Complex XML

[XML Records] Complex XML

Forge Component
Published on 15 Jun by Ricardo Silva
24 votes
Published on 15 Jun by Ricardo Silva
Hi Outsystems Community! I'm here again to ask another question from the Gods of Outsystem :D

How should i deal with an xml complex as this? (File Attached in this message)

I tried experimenting using the XML Records but all i could do is a simple multi layered structure not like the one attached. Do you have any ideas on how I should deal with this?

Thank you guys in advance for any help or suggestions!:)

Hello Lennard,

On version 1.3 of that component you can find a sample OML, where some examples are given.
Hope it helps you.

You can also achieve to use that XML Records extension with a similar XML but also simpler, and for that, you can use the XML extension to do a XSL Transformation to obtain the necessary XML input to instantiate the OS record.

Kind regards.

Daniel Martins.
Thank You Sir Daniel!:)

    I tried using the XML extension yesterday after I posted this. And it seems that I can use the extention to get the data I needed. This extention is a great help for others who are going to parse a complex xml:)

You are welcome, Lennard!

I'm glad that you sorted it out the solution, and, I'm glad i could help you.
I have solved my problem using a combination of XmlElement_ChildByIndex, XMLElement_GetChildCount, XMLElement_GetInnerText, XMLElement_GetName, and Switch in dealing with numerous Child Nodes. 

I hope this would help give an idea for other users who are dealing with complex xml:)