Custom func for xmlElements