How to generate an XML element with attributes and an array value from a map #2293
-
I'm sure this is simple, but I'm just not finding a good answer! I have two inputs that I'm merging and turning into XML. The "update" input looks like this:
The "figures" input (that will be updated) looks like this:
The final stage in this merges the updates with the figures and generates YAML that converts nicely into the XML that I need. The YAML I currently generate looks like this (I've cut this down to just show the first figure to save space):
And it generates XML like this:
The script is:
Now, what's driving me nuts is that I would really like the XML to be wrapped inside a "div" with some attributes. To do that, I'd need to generate YAML that looks like this:
And I just can't come up with a reasonable way to do it! As I said, I'm sure this is easy! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
And, I'm an idiot. I just needed to let "figure" be an array and the correct XML was output. The following works:
I'm closing this. |
Beta Was this translation helpful? Give feedback.
And, I'm an idiot. I just needed to let "figure" be an array and the correct XML was output. The following works:
I'm closing this.