Hi Mauro,
It turns out we’ve thought about adding such a function (and another reverse one) to our modules just recently. We’re still wondering how to name the functions, though; suggestions are welcome!
The attached script contains implementations of the conversions in XQuery; I hope they are helpful.
All the best, Christian
After parsing strings in XML with direct representation (e.g. with CSV and JSON module parsing) the specific entries are represented via elements and their names are rewritten. In particular (as per documentation): "underscores are rewritten to two underscores (__), and characters that are not valid in element names are rewritten to an underscore and the character’s four-digit Unicode.”
It is possible to convert back the element’s node name with an XQuery function present in some module?
Regards,
Mauro