Hello Community,
I have several XML files, but there are files that have one item and others have 5 or more items.
When using PARSE JSON, it works in some files but in another it gives me an error.
How can I do PARSE JSON equivalence for all my XML files?
I attach two files, the 714 file works fine for me, but the 951 gives me an error.
I leave images of the flow
That definitely makes it interesting. It might be better to work directly with the XML rather than converting it to JSON.
What exactly are you trying to extract out of the XML documents? I can try to provide some XPath expressions that work on the XML once I know exactly what you're after.
Thanks for your reply.
I was able to solve Parse Json, with your solution.
But since I want to make a Table with the data, I get this error when I use "Append to Array Variable".
From what I see is that some XML in "Detalle" tells me array and others Object.
How can I solve that?
You should ensure your schema caters for all scenarios - so includes all possible properties. However, you would likely need to remove any instances of required in the schema as this is likely what's causing the errors.
So, in your schema, you may have instances such as that below which you should remove since some of the XML data doesn't include all properties.
"required": [
"NroLinDet",
"CdgItem",
"NmbItem",
"DscItem",
"QtyItem",
"UnmdItem",
"PrcItem",
"MontoItem"
]