return a proper xmlelement result