I rarely maximize, I want windows to reposition and resize to where there were in the last editing session. This should be recorded on a per file basis (not a single record of the last editing session of the application).
In my apps I create settings file where I record window position, size and (depending on the app), the position in the file, or the last input field/control, or other information to restore the editing context.
This, should be recorded separately for each user (the position should not be recorded in the file because if the file is shared with a different user or edited in a different context, the other user may move the window to an undesirable position), so for Windows I put this in the users's local settings folder (DO NOT put it in the registry), for UNIX I put this in a ~home/.app directory.
I usually have one file for each application program (so the app can easily find it's position settings) with one record entry for each file (or editing session).
I defininately would not use XML for this (I'll use a simple formated text or binary file).
The user should be able to easily clear/reset all and/or the least recently access saved window positions (I.e. in the apps' tools/options/settings menu).
Also make sure to handle the case where a window gets positioned off screen
(I.e. desktop is resized or was on a disconnected multiple monitor), you may need to
shift the window back onto the desktop.