Xpath Ostatni węzeł

(//element[@name='D'])[last()]
Enrybi