Generating dark solitons through cross-phase modulation in optical fibers