Create a LaTeX template, populate the template using the data, and then run pdflatex
on it.
Note that the XMLish thing you posted is not helpful. Either post the actual XML or the Perl data structure.
Here is an example:
#!/usr/bin/env perl
use warnings; use strict;
use HTML::Template;
use XML::Simple;
my $xml = <<'EO_XML';
<students>
<student id="24">
<address>
<streetname val="xxxx"/>
<housenum val="138" />
</address>
</student>
<student id="20">
<address>
<streetname val="xxxx"/>
<housenum val="110" />
</address>
</student>
</students>
EO_XML
my $data = XMLin($xml)->{student};
my @loop_data;
for my $student (values %$data) {
my $address = $student->{address};
push @loop_data, {
HOUSENUM => $address->{housenum}{val},
STREETNAME => $address->{streetname}{val},
};
}
my $tmpl = HTML::Template->new(filehandle => \*DATA);
$tmpl->param(STUDENTS => \@loop_data);
$tmpl->output(print_to => \*STDOUT);
__DATA__
\documentclass{article}
\begin{document}
<TMPL_LOOP STUDENTS>
<TMPL_VAR HOUSENUM> <TMPL_VAR STREETNAME>
</TMPL_LOOP>
\end{document}