Hi, I have written a perl program that is supposed to search for a set of customer details on our database and return them 1 after the other. The problem is that it is returning the customers as well as cdetail id, type, checksum. The problem is that is returning the checksum the same amount of times as the number of the account (ie) account number 222222222 returns the cdetail, type, checksum line twice - account number 333333333 returns the cdetail, type, checksum line 3 times, and so on. I don't mind it looking for the cdetail, type, checksum line once but why is it doing it like this. I am very new to Perl and have used part of another script to make this so please excuse my ignorance. Please see attached mcp6.pl which is my script and test6.xml which displays the results.
Thanks in advance McP
mcp6.pl
Description: Perl program
<?xml version="1.0" encoding="iso-8859-1" ?> <awb_pers> <customer id="0170738" account="111111111" country="AL" volume="10" lang=""> <cdetail id="" type="" checksum="0"> </cdetail> </customer> <customer id="1170739" account="222222222" country="AL" volume="10" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </customer> <customer id="2170740" account="333333333" country="AL" volume="10" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </cdetail> </customer> <customer id="3170741" account="444444444" country="AL" volume="10" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </cdetail> </cdetail> </customer> <customer id="4170742" account="555555555" country="AL" volume="10" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </customer> <customer id="5170743" account="666666666" country="AL" volume="" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </customer> <customer id="6171126" account="777777777" country="AL" volume="20" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </customer> <customer id="6171126" account="777777777" country="AL" volume="20" lang=""> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> <cdetail id="" type="" checksum="0"> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </cdetail> </customer> </customer> </awb_pers>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]