in reply to How can I replace a line (tag) in an XML file?
open test.xml ; set /students/student[id="002"]/gpa "B" ; save :b ; [download]