The toString() function might return XML unsafe characters like "<MAP>", is that OK?
(see https://github.com/yast/yast-core/blob/c06ea0f1600a18dd539685ef8ccd90d4358514bf/libycp/src/Type.cc#L194)

Moreover toXmlString() calls preToString() + toString() + postToString(), where toString() returns preToString() + ret + postToString().
For me it seems that preToString() and postToString() will be twice in the result.