1 - What do you exactly want to do with the xml data? the xml data simply defines which message is being attached to which controller. Something you can’t really influence from the outside unless you program a script for it. You could always copy a device after you attached amidi command to it and them copy the clipboard contents into an editor, it will reveal the midimapping if i’m correct.
2 - If you want to make it listen to a specific value then make min = max (set both fields to the same value).