This was a common problem with earlier Xterras. The fuel sending unit would become corroded and needs to be replaced. It is actually a recall that Nissan did and repaired for free. Talk to your dealer. Its probably in the search too.