Trial IDMooza
Trial IDbin_salim99
Trial IDdino88
Trial IDal3neeeeed
TrialIDDo0oDa
#### use XML::Writer; use XML::XPath; use XML::XPath::Node; use IO::File; open(NEW, "<<../main/idno.txt"); @id = ; close (NEW); my $output = new IO::File(">data9.xml"); my $doc = XML::Writer->new(OUTPUT => $output); $doc->xmlDecl("windows-1252"); $doc->startTag("IDList"); foreach (@id) { ($actid, $name) = split(/:/, $_); $doc->startTag( "Details" ); $doc->dataElement( id => $actid); $doc->dataElement( name => $name); $doc->endTag("Details"); } $doc->endTag("IDList"); # close IDList $doc->end(); # final checks $output->close();