I’m trying to generate an XML form a JSON. I’m struggling to add the attributes of the header tag. I’m using the XML node with the option “Attribute Key” with a $.
When I add a the attribute as a field starting with $ I get the error: “Invalid character in name”.
What would be the right way of doing it?
Below you can see a workflow that shows the issue:
I don’t want the final XML to have any $. But I do want the xml nodes to have some attributes and I understood the attribute key was just a way to identify the attributes from the input.
Do you have an example of an XML node generating an XML with notes with attributes?
If you take your example and remove the $ from the input json it will generate the example. The issue is becuase it is there we are trying to use it in the output, If you don’t want the $ maybe renaming the key to remove the $ would work before converting to XML.
That sounds like a different question but I understand it, I will need to have a play with the node and check the docs for the package we use to see if that is possible.
I was also messing around with it a couple of months ago. If I recall correctly you create a key $ with an object as value where you put the attributes.
So something like:
Element: {
$:{
Key:“some id”
}
ElementField:“value”
}