toXML() fetch records month wise not all records

i want toXML function to generate XML file for particular month records and not for all records

example :

i want events of march 2014 so why to fetch previous records

any suggestions ?

Unfortunately there is no way to get such output with current codebase.
You can use scheduler.getEvents to gel collection of json object for any time range, and use some custom code to generate xml string from such collection.