Handling VST Preset Programs?

What is the best way to store or handle preset programs? My first feeling is to use get and setstateinformation functions with xml like in the demo, but not sure how often this gets called by the host? What is a good setup go with in setting up the structure of the xml that can handle many programs, Any ideas tips will help, thanks.

XML is fine if you’ve not got much data to store - it doesn’t get called very often by the host, and makes things easier if you change the data format later on. I’d only suggest using binary if you’re storing megabytes of stuff in there.