Gracias Fidel por contestar, con tu ayuda y algunas mañas logré armar mi archivo xml, solo me queda una duda, a continuación copio el código, pero la etiqueta <Asegurados> no me aparece como tal, por ejemplo SSN aparece -<SSN>, Detalla también -<Detalle> pero Asegurados sale sin el guión y las etiquetas TipoAsegurado, TipoDoc aparecen en negro y no en rojo como los otros casos, me puedes ayudar, gracias
Eduardo
LOCAL cXml, CXML1, cxml2, cxml3
SELECT productor
GO top
SELECT emision
GO top
TEXT TO cXml1 NOSHOW TEXT PRETEXT 7
<?xml version="1.0" encoding="utf-8"?>
<SSN>
<Cabecera>
<Version>1</Version>
<Productor TipoPersona="<<ALLTRIM(productor.tipo)>>" Matricula="<<ALLTRIM(productor.matricula)>>" CUIT="<<ALLTRIM(productor.cuit)>>"/>
<CantidadRegistros>"<<ALLTRIM(emision.e)>>"</CantidadRegistros>
</Cabecera>
<Detalle
ENDTEXT
=STRTOFILE(cXML1, "miArchivo.xml",.t.)
=STRTOFILE(cXML1, "miArchivo.txt",.t.)
SCAN
TEXT TO cXML TEXT NOSHOW PRETEXT 7
>
<Registro>
<NroOrden>"<<ALLTRIM(emision.f)>>"</NroOrden>
<FechaRegistro>"<<ALLTRIM(emision.g)>>"</FechaRegistro>
<Asegurados>
Asegurado TipoAsegurado="<<ALLTRIM(emision.j)>>" TipoDoc="<<ALLTRIM(emision.k)>>" NroDoc="<<ALLTRIM(emision.i)>>" Nombre="<<alltrim(emision.h)>>"
</Asegurados>
<CPACantidad>"<<alltrim(emision.l)>>"</CPACantidad>
<CodigosPostales>
<CPA>"<<ALLTRIM(emision.m)>>"</CPA>
</CodigosPostales>
<CiaID>"<<allt(emision.n)>>"</CiaID>
<BienAsegurado>"<<ALLTRIM(emision.o)>>"</BienAsegurado>
<Ramo>"<<ALLTRIM(emision.p)>>"</Ramo>
<SumaAsegurada>"<<ALLTRIM(emision.q)>>"</SumaAsegurada>
<SumaAseguradaTipo>"<<ALLTRIM(emision.r)>>"</SumaAseguradaTipo>
<Cobertura FechaDesde="<<ALLTRIM(emision.s)>>" FechaHasta="<<ALLTRIM(emision.t)>>" />
<Observacion Tipo="<<ALLTRIM(emision.v)>>" Poliza="<<ALLTRIM(emision.u)>>" />
<OperacionOrigen><<ALLTRIM(emision.w)>>"</OperacionOrigen>
</Registro
ENDTEXT
=STRTOFILE(cXML, "miArchivo.xml",.t.)
=STRTOFILE(cXML, "miArchivo.txt",.t.)
ENDSCAN
TEXT TO cxml2 text NOSHOW PRETEXT 7
>
</Detalle>
</SSN>
endtext
=STRTOFILE(cxml2, "miArchivo.xml",.t.)
=STRTOFILE(cxml2, "miArchivo.txt",.t.)