Hi Francisco,
I'm afraid there is nothing quite so simple as setDataContent (maybe there should be) but FoX does have tools to help with this. First, some background. Strictly speaking extractDataContent isn't a DOM function, it is an extra function in FoX_DOM that exists to make the lives of Fortran programmers a bit easer. In pure DOM text nodes only contain textural data but we need some way to turn the string "1" into a Fortran integer (or real, or whatever) so that we can do useful things with it. This is what extractDataContent does, first reading the text node then doing the conversion into whatever datatype "data" happens to be. It's actually little more than a wrapper around the DOM level 3 method getTextContent(). The string to Fortran data type conversion is done by rts() in the FoX_common module.
There is a FoX_common function which does the inverse of rts() called str(). So, all you should need to do to reset the data is:
call setTextContent(np, str(data))
I've not tested this but it ought to work. You'll need to remember to "use FoX_common" as well as FoX_DOM. I don't think it would be hard to write a setDataContent subroutine (beyond the usual challenge of dealing with m4).
I hope this helps,
Andrew