$ sed -e '1s/name/something/2' -e '3s/name/somethingdifferent/2' -e 's/password/somethingelse/2' sample.xml