Best way to create an XML output file
I need to create a concurrent process to generate a XML output file with this structure:
<?xml version="1.0"?>
<lote_incidencias xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Enterprise>
<beneficiario>
<rfc_benef>FO0005172NA</rfc_benef>
<rp_benef>B1000911107</rp_benef>
<razon_social>CERVECERIA SOL</razon_social>
<trabajadores>
<trabajador>
<rp_patron>B1234567100</rp_patron>
<tipo_incidencia>08</tipo_incidencia>
<nss>11698729992</nss>
<curp>TOLF800512HDFRGS27</curp>
<primer_ap>TORRES</primer_ap>
<segundo_ap>LAGUNA</segundo_ap>
<nombre>FERNANDO</nombre>
<fecha_ini_asig>19/01/2010</fecha_ini_asig>
</trabajador>
</trabajadores>
</beneficiario>
</Enterprise>
</lote_incidencias>
Thanks
Armando V.