Your code does not even compile. You can help us help you better by posting the actual code that you are running.
Can't declare constant item in "my" at tmp.pl line 1, near ");" No such class SourceXmlName at tmp.pl line 5, near "my SourceXmlName" syntax error at tmp.pl line 5, near "my SourceXmlName;" Execution of tmp.pl aborted due to compilation errors.
From looking through your source code, you seem to be very confused about how Perl declares variables. Maybe an introductory text about Perl helps, or perlsyn? Perl variables generally have a dollar sign in front of them.
Looking beyond all that, my guess is that sample.xml (or whatever file is named in the actuall error message which you don't show) does either not exist, or is empty, or does not contain valid XML.
In reply to Re: Copy portion of XML elements from one XML file to another exiting XML file
by Corion
in thread Copy portion of XML elements from one XML file to another exiting XML file
by Dravidan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |