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?

While invoking xmlNodeToDcument service, all the record from the XML doc will appear as document list. You can loop over the doc list which will give you each and every record at a time. Refer to Developer’s guide Appendix section to know how to use Loop.