Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
What's wrong with the existing LabVIEW primatives?
There is more XML in the LV example, but it is there for a reason for it. The LV primatives will support any LV data type and to do that, the implementation must be more generic. While the VIs you did will generate easier to read XML, they will fail as soon as you try to convert a cluster with a data type not explicitly supported, such as an array or sub-cluster or event timestamp.