filepolling:fetching records from a file

i have to monitor for a xml file,whenever it arrives in monitoring directory i have to fetch each record from a file,and i have to validate each record.can Here i have a doubt i.e how to fetch each record at a time after doing xmlnodetodocument.any one can help pls?

Yes for validation of each record (you mean each XML from the filepoll?) and validation service would be pub.schema:validate(node)

HTH,
RMG