Hi All,
I have following problem i want to build an KNIME application which transforms Excel to XML , so I used the Column to XML Node to convert my Test-Row to XML.
It´s very important that the Elements of the XML-File are in a certain order, but it seems like the Column to XML Node sorts the elements automatically in alphabetical order.
Does someone know how to change the order of the XML-Elements in the output data?
as far as I know - according to the XML specification, it is not important.
“the order of attribute specifications in a start-tag or empty-element tag is not significant”
->https://www.w3.org/TR/xml/
…so I think KNIME does the correct thing here and do it alphabetical
But you could trick KNIME to do the order you want anyways.
Name your attributes with an unique prefix
e.g. C1_ --it should be something which does not appear in your XML content
Then replace the prefix with a string manipulation node or string replacer afterwards
However like stated above…I think you are using the XML not like it is in the specification of XML.
At least as far as I know / a quick google search told me