Can one upgrade cable fork remote to a hydraulic fork remote? (Rockshox Pushloc to XLoc Sprint?) I have a hard tail with a cable based remote lock:  

RockShox Pushloc:


However, it's not that reliable. 90% of the time it works, but sometimes it get's stuck and won't unlock the first time around. I have to wiggle/press again for it to work. (I tired taking apart, oiling etc...).

I want to upgrade to a Rock shox XLoc Sprint, a hydraulic remote lock.
Is this possible? It seems like it has a slightly different mechanism at the top. Would I be able to take out the cable based one and replace it with the hydraulic version without changing the fork?
It is possible to upgrade on some fork models yes.
You will need to check the fork compatibility though to be sure. Check the SRAM site for a quick idea if your model is/was available with the Xloc. Else you need to get your fork serial to a dealer and ask them if it's compatible.  

Then remember, that it will require the the compression damper parts as well. You can't simply swap the cable and lever parts.

When you consider the cost, it hardly ever justifies the exercise(add labour). You may just want to look at the cable maintenance part of the old system, save the cash and then later spend the money on a different fork all together.