Start moving XML functions to s3xml.c