I have XML having this kind of format.
<BH> is Header of <BL> List but is not inside of the tag.<BL> is a List
XML Format:
Converting it to Structure literally will look like this:
But I need dynamic BH & BL nodes
Thanks.
Hello Marco,
If there are "interfering" tags between your lists of tags (BL between your list of BH), then I don't think there's an easy way to do this. XML Records requires your XML to be predictable so that values can be mapped to the Structure that you defined. If the order of elements inside could completely change within a tag then it would be extremely complex to fill out a Structure.
Do you control the provider of this XML, or can you influence its format in any way? I think the best solution would be to make sure the XML tags are either:
- ordered (a list of BH followed by a list of BL): this would make it so you can use lists inside your Structure safely and make it fully dynamic;
- grouped: I don't know if the tags that you shared are semantically related (BH belongs to BL or vice-versa), so if they were grouped in a parent tag like this:
<Parent>
<BH>
<ListOfBL>
</Parent>
<AnotherParent>
...
</AnotherParent>
this would make it possible to create a fully dynamic Structure with Lists.
Yes. you're right about how the XML format should be. but unfortunately, i have no control over it. thanks for the confirmation.
May I ask you how did you solve this?
I'm facing the exact same problem.