Hope this can help u ...
1. MRT to Taipei Main Station; train to Rui-fang, then bus to Jiufen. Once u reach Fui Fanf Train Station, u ask around,they will tell u which bus to take.
2. Bus to Keelung (for "miaoko")
3. Train to Taipei
4. MRT to Ximen Station (for Ximending)