A modified hydrothermal diamond anvil cell (HDAC) rail assembly has been constructed for making synchrotron x-ray absorption spectroscopy, x-ray fluorescence, and x-ray mapping measurements on fluids or solid phases in contact with hydrothermal fluids up to ∼900 °C and 700 MPa. The diamond anvils of the HDAC are modified by laser milling grooves or holes, for the reduction of attenuation of incident and fluorescent x rays and sample cavities. The modified HDAC rail assembly has flexibility in design for measurement of light elements at low concentrations or heavy elements at trace levels in the sample and the capability to probe minute individual phases of a multiphase fluid-based system using focused x-ray microbeam. The supporting rail allows for uniform translation of the HDAC, rotation and tilt stages, and a focusing mirror, which is used to illuminate the sample for visual observation using a microscope, relative to the direction of the incident x-ray beam. A structure study of Eu(III) aqua ion behavior in high-temperature aqueous solutions and a study of Nb partitioning and coordination in a silicate melt in contact with a hydrothermal fluid are described as applications utilizing the modified HDAC rail assembly.