Select the element to be renamed, and right click to bring up the drop down box.
From the menu, pick Rename... and a dialog box will appear asking for the new name.
Type the new name in the dialog box, replacing the old name.
The element will now appear on the graph under its new name, and the XML file will automatically be altered upon the next save to reflect this change.
Renaming of an edge occurs similarly. Select the edge to be renamed, input the new name, and the edge will automatically appear on the sketch with its new name and the XML file will automatically be updated after the next save.