From: Paul Rousseau <paulrousseau...@hotmail.com> > I have an .xml file that I want to search for specific items, ignoring the > remaining items. > > I want to be able to maintain the .xml file integrity, so I want to open the > original and after finding what I am looking for, dump the results to a > second file. > > I am thinking I would need logic to do the following. > > 1. Open the .xml file. > 2. Begin parsing. > 3. If the object is not 'Item', keep it. (This will keep objects such as > 'Session', 'Server', 'Group') > 4. If the object is 'Item', and it contains the text, '.Latched', keep it. > 5. Otherwise, ignore 'Item' > 6. Open the output file. > 7. Write out all the kept items. > 8. Close both files. > > Any help would be greatly appreciated. > > Paul Rousseau >
See XML::Rules in the filter mode. Jenda ===== je...@krynicky.cz === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs