First pass for XML functionality.