Photons and electrons are two common relaxation products upon X-ray absorption, enabling fluorescence yield and electron yield detections for X-ray absorption spectroscopy (XAS). The ions that are created during the electron yield process are relaxation products too, which are exploited in this study to produce ion yield for XA detection. The ionic currents measured in a liquid cell filled with water or iron(III) nitrate aqueous solutions exhibit characteristic O K-edge and Fe L-edge absorption profiles as a function of excitation energy. Application of two electrodes installed in the cell is crucial for obtaining the XA spectra of the liquids behind membranes. Using a single electrode can only probe the species adsorbed on the membrane surface. The ionic-current detection, termed as total ion yield (TIY) in this study, also produces an undistorted Fe L-edge XA spectrum, indicating its promising role as a novel detection method for XAS studies in liquid cells.