smartxml: helper functions