In response to a request from a commenter to a previous post, I'll post some photos I took when I installed a new hood sensor on my LR3. Like many others, the alarm was sounding randomly due to an intermittent failure of the microswitch in this sensor. The hood sensor is attached to the passenger side hood latch.
To release the sensor, you need to press on some plastic retention tabs that are accessible via small holes on the front face of the hood latch. Just press with the end of a screwdriver.
The next photo shows the sensor and the two tabs mentioned above.
The wires connected to the sensor can also be easily disconnected. It's just a bit harder to reach behind the sensor. Press down on a small plastic tab on the connector and pull away from the sensor - toward the engine.