Compañeros.
El XSD que publique. Genera el XML.
La mejor forma de obtener el XML, es con visual studio.
Hay varios conversores online, pero son malos.
Ahora, el programa que les publique solamente lo tienen que modiicar para utilizar el XML y listo.
<?xml version="1.0" encoding="utf-8"?>
<Clave>Clave1</Clave>
<NumeroConsecutivo>NumeroConsecutivo1</NumeroConsecutivo>
<FechaEmision>1900-01-01T01:01:01-06:00</FechaEmision>
<Emisor>
<Nombre>Nombre1</Nombre>
<Identificacion>
<Tipo>01</Tipo>
<Numero>Numero1</Numero>
</Identificacion>
<NombreComercial>NombreComercial1</NombreComercial>
<Ubicacion>
<Provincia>1</Provincia>
<Canton>C1</Canton>
<Distrito>D1</Distrito>
<Barrio>B1</Barrio>
<OtrasSenas>OtrasSenas1</OtrasSenas>
</Ubicacion>
<CorreoElectronico>CorreoElectronico1</CorreoElectronico>
</Emisor>
<Receptor>
<Nombre>Nombre1</Nombre>
<Identificacion>
<Tipo>01</Tipo>
<Numero>Numero1</Numero>
</Identificacion>
<IdentificacionExtranjero>IdentificacionExtra1</IdentificacionExtranjero>
<NombreComercial>NombreComercial1</NombreComercial>
<Ubicacion>
<Provincia>1</Provincia>
<Canton>C1</Canton>
<Distrito>D1</Distrito>
<Barrio>B1</Barrio>
<OtrasSenas>OtrasSenas1</OtrasSenas>
</Ubicacion>
<Telefono>
<CodigoPais>1</CodigoPais>
<NumTelefono>1</NumTelefono>
</Telefono>
<Fax>
<CodigoPais>1</CodigoPais>
<NumTelefono>1</NumTelefono>
</Fax>
<CorreoElectronico>CorreoElectronico1</CorreoElectronico>
</Receptor>
<CondicionVenta>01</CondicionVenta>
<PlazoCredito>PlazoCred1</PlazoCredito>
<MedioPago>01</MedioPago>
<MedioPago>02</MedioPago>
<MedioPago>03</MedioPago>
<DetalleServicio>
<LineaDetalle>
<NumeroLinea>1</NumeroLinea>
<Codigo>
<Tipo>01</Tipo>
<Codigo>Codigo1</Codigo>
</Codigo>
<Codigo>
<Tipo>02</Tipo>
<Codigo>Codigo2</Codigo>
</Codigo>
<Codigo>
<Tipo>03</Tipo>
<Codigo>Codigo3</Codigo>
</Codigo>
<Cantidad>1</Cantidad>
<UnidadMedida>Sp</UnidadMedida>
<UnidadMedidaComercial>UnidadMedidaComerci1</UnidadMedidaComercial>
<Detalle>Detalle1</Detalle>
<PrecioUnitario>0</PrecioUnitario>
<MontoTotal>0</MontoTotal>
<MontoDescuento>0</MontoDescuento>
<NaturalezaDescuento>NaturalezaDescuento1</NaturalezaDescuento>
<SubTotal>0</SubTotal>
<Impuesto>
<Codigo>01</Codigo>
<Tarifa>1</Tarifa>
<Monto>0</Monto>
<Exoneracion>
<TipoDocumento>01</TipoDocumento>
<NumeroDocumento>NumeroDocumento1</NumeroDocumento>
<NombreInstitucion>NombreInstitucion1</NombreInstitucion>
<FechaEmision>1900-01-01T01:01:01-06:00</FechaEmision>
<MontoImpuesto>0</MontoImpuesto>
<PorcentajeCompra>1</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<Impuesto>
<Codigo>02</Codigo>
<Tarifa>-99.99</Tarifa>
<Monto>-10000000000000</Monto>
<Exoneracion>
<TipoDocumento>02</TipoDocumento>
<NumeroDocumento>NumeroDocumento2</NumeroDocumento>
<NombreInstitucion>NombreInstitucion2</NombreInstitucion>
<FechaEmision>0001-01-01T00:00:00-06:00</FechaEmision>
<MontoImpuesto>-10000000000000</MontoImpuesto>
<PorcentajeCompra>-999</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<Impuesto>
<Codigo>03</Codigo>
<Tarifa>99.99</Tarifa>
<Monto>10000000000000</Monto>
<Exoneracion>
<TipoDocumento>03</TipoDocumento>
<NumeroDocumento>NumeroDocumento3</NumeroDocumento>
<NombreInstitucion>NombreInstitucion3</NombreInstitucion>
<FechaEmision>9999-12-31T23:59:59.9999999-06:00</FechaEmision>
<MontoImpuesto>10000000000000</MontoImpuesto>
<PorcentajeCompra>999</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<MontoTotalLinea>0</MontoTotalLinea>
</LineaDetalle>
<LineaDetalle>
<NumeroLinea>79228162514264337593543950335</NumeroLinea>
<Codigo>
<Tipo>04</Tipo>
<Codigo>Codigo4</Codigo>
</Codigo>
<Codigo>
<Tipo>99</Tipo>
<Codigo>Codigo5</Codigo>
</Codigo>
<Codigo>
<Tipo>01</Tipo>
<Codigo>Codigo6</Codigo>
</Codigo>
<Cantidad>-10000000000000</Cantidad>
<UnidadMedida>m</UnidadMedida>
<UnidadMedidaComercial>UnidadMedidaComerci2</UnidadMedidaComercial>
<Detalle>Detalle2</Detalle>
<PrecioUnitario>-10000000000000</PrecioUnitario>
<MontoTotal>-10000000000000</MontoTotal>
<MontoDescuento>-10000000000000</MontoDescuento>
<NaturalezaDescuento>NaturalezaDescuento2</NaturalezaDescuento>
<SubTotal>-10000000000000</SubTotal>
<Impuesto>
<Codigo>04</Codigo>
<Tarifa>0.99</Tarifa>
<Monto>-0.0000000000001</Monto>
<Exoneracion>
<TipoDocumento>04</TipoDocumento>
<NumeroDocumento>NumeroDocumento4</NumeroDocumento>
<NombreInstitucion>NombreInstitucion4</NombreInstitucion>
<FechaEmision>1899-11-30T01:01:01-06:00</FechaEmision>
<MontoImpuesto>-0.0000000000001</MontoImpuesto>
<PorcentajeCompra>0</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<Impuesto>
<Codigo>05</Codigo>
<Tarifa>1.01</Tarifa>
<Monto>0.0000000000001</Monto>
<Exoneracion>
<TipoDocumento>05</TipoDocumento>
<NumeroDocumento>NumeroDocumento5</NumeroDocumento>
<NombreInstitucion>NombreInstitucion5</NombreInstitucion>
<FechaEmision>1900-02-02T01:01:01-06:00</FechaEmision>
<MontoImpuesto>0.0000000000001</MontoImpuesto>
<PorcentajeCompra>2</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<Impuesto>
<Codigo>06</Codigo>
<Tarifa>-99.98</Tarifa>
<Monto>-9999999999999.9999999999999</Monto>
<Exoneracion>
<TipoDocumento>99</TipoDocumento>
<NumeroDocumento>NumeroDocumento6</NumeroDocumento>
<NombreInstitucion>NombreInstitucion6</NombreInstitucion>
<FechaEmision>0001-02-02T00:00:00-06:00</FechaEmision>
<MontoImpuesto>-9999999999999.9999999999999</MontoImpuesto>
<PorcentajeCompra>-998</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<MontoTotalLinea>-10000000000000</MontoTotalLinea>
</LineaDetalle>
<LineaDetalle>
<NumeroLinea>2</NumeroLinea>
<Codigo>
<Tipo>02</Tipo>
<Codigo>Codigo7</Codigo>
</Codigo>
<Codigo>
<Tipo>03</Tipo>
<Codigo>Codigo8</Codigo>
</Codigo>
<Codigo>
<Tipo>04</Tipo>
<Codigo>Codigo9</Codigo>
</Codigo>
<Cantidad>10000000000000</Cantidad>
<UnidadMedida>kg</UnidadMedida>
<UnidadMedidaComercial>UnidadMedidaComerci3</UnidadMedidaComercial>
<Detalle>Detalle3</Detalle>
<PrecioUnitario>10000000000000</PrecioUnitario>
<MontoTotal>10000000000000</MontoTotal>
<MontoDescuento>10000000000000</MontoDescuento>
<NaturalezaDescuento>NaturalezaDescuento3</NaturalezaDescuento>
<SubTotal>10000000000000</SubTotal>
<Impuesto>
<Codigo>07</Codigo>
<Tarifa>99.98</Tarifa>
<Monto>9999999999999.9999999999999</Monto>
<Exoneracion>
<TipoDocumento>01</TipoDocumento>
<NumeroDocumento>NumeroDocumento7</NumeroDocumento>
<NombreInstitucion>NombreInstitucion7</NombreInstitucion>
<FechaEmision>9999-11-29T23:59:59.9999999-06:00</FechaEmision>
<MontoImpuesto>9999999999999.9999999999999</MontoImpuesto>
<PorcentajeCompra>998</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<Impuesto>
<Codigo>08</Codigo>
<Tarifa>0.98</Tarifa>
<Monto>-0.0000000000002</Monto>
<Exoneracion>
<TipoDocumento>02</TipoDocumento>
<NumeroDocumento>NumeroDocumento8</NumeroDocumento>
<NombreInstitucion>NombreInstitucion8</NombreInstitucion>
<FechaEmision>1899-10-29T01:01:01-06:00</FechaEmision>
<MontoImpuesto>-0.0000000000002</MontoImpuesto>
<PorcentajeCompra>-1</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<Impuesto>
<Codigo>09</Codigo>
<Tarifa>1.02</Tarifa>
<Monto>0.0000000000002</Monto>
<Exoneracion>
<TipoDocumento>03</TipoDocumento>
<NumeroDocumento>NumeroDocumento9</NumeroDocumento>
<NombreInstitucion>NombreInstitucion9</NombreInstitucion>
<FechaEmision>1900-03-06T01:01:01-06:00</FechaEmision>
<MontoImpuesto>0.0000000000002</MontoImpuesto>
<PorcentajeCompra>3</PorcentajeCompra>
</Exoneracion>
</Impuesto>
<MontoTotalLinea>10000000000000</MontoTotalLinea>
</LineaDetalle>
</DetalleServicio>
<ResumenFactura>
<CodigoMoneda>AED</CodigoMoneda>
<TipoCambio>0</TipoCambio>
<TotalServGravados>0</TotalServGravados>
<TotalServExentos>0</TotalServExentos>
<TotalMercanciasGravadas>0</TotalMercanciasGravadas>
<TotalMercanciasExentas>0</TotalMercanciasExentas>
<TotalGravado>0</TotalGravado>
<TotalExento>0</TotalExento>
<TotalVenta>0</TotalVenta>
<TotalDescuentos>0</TotalDescuentos>
<TotalVentaNeta>0</TotalVentaNeta>
<TotalImpuesto>0</TotalImpuesto>
<TotalComprobante>0</TotalComprobante>
</ResumenFactura>
<InformacionReferencia>
<TipoDoc>01</TipoDoc>
<Numero>Numero1</Numero>
<FechaEmision>1900-01-01T01:01:01-06:00</FechaEmision>
<Codigo>01</Codigo>
<Razon>Razon1</Razon>
</InformacionReferencia>
<InformacionReferencia>
<TipoDoc>02</TipoDoc>
<Numero>Numero2</Numero>
<FechaEmision>0001-01-01T00:00:00-06:00</FechaEmision>
<Codigo>02</Codigo>
<Razon>Razon2</Razon>
</InformacionReferencia>
<InformacionReferencia>
<TipoDoc>03</TipoDoc>
<Numero>Numero3</Numero>
<FechaEmision>9999-12-31T23:59:59.9999999-06:00</FechaEmision>
<Codigo>03</Codigo>
<Razon>Razon3</Razon>
</InformacionReferencia>
<Normativa>
<NumeroResolucion>NumeroResolu1</NumeroResolucion>
<FechaResolucion>FechaResolucion1</FechaResolucion>
</Normativa>
<Otros>
<OtroTexto codigo="codigo1">OtroTexto1</OtroTexto>
<OtroTexto codigo="codigo2">OtroTexto2</OtroTexto>
<OtroTexto codigo="codigo3">OtroTexto3</OtroTexto>
<OtroContenido codigo="codigo1">
<any_element xmlns="otherNS">anyType</any_element>
</OtroContenido>
<OtroContenido codigo="codigo2">
<any_element xmlns="otherNS">anyType</any_element>
</OtroContenido>
<OtroContenido codigo="codigo3">
<any_element xmlns="otherNS">anyType</any_element>
</OtroContenido>
</Otros>
<SignedInfo Id="ID2">
<CanonicalizationMethod Algorithm="
http://uri1">text</CanonicalizationMethod>
<SignatureMethod Algorithm="
http://uri1">text<HMACOutputLength>1</HMACOutputLength></SignatureMethod>
<Transforms>
<Transform Algorithm="
http://uri1">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath1</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
<Transform Algorithm="
http://uri2">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath2</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
<Transform Algorithm="
http://uri3">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath3</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
</Transforms>
<DigestMethod Algorithm="
http://uri1">text</DigestMethod>
<DigestValue>AAECAwQFBgcICQoLDA0ODw==</DigestValue>
</Reference>
<Transforms>
<Transform Algorithm="
http://uri4">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath4</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
<Transform Algorithm="
http://uri5">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath5</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
<Transform Algorithm="
http://uri6">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath6</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
</Transforms>
<DigestMethod Algorithm="
http://uri2">text</DigestMethod>
<DigestValue>AAECAwQFBgcICQoLDA0ODw==</DigestValue>
</Reference>
<Transforms>
<Transform Algorithm="
http://uri7">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath7</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
<Transform Algorithm="
http://uri8">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath8</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
<Transform Algorithm="
http://uri9">text<any_element xmlns="otherNS">anyType</any_element><XPath>XPath9</XPath><any_element xmlns="otherNS">anyType</any_element></Transform>
</Transforms>
<DigestMethod Algorithm="
http://uri3">text</DigestMethod>
<DigestValue>AAECAwQFBgcICQoLDA0ODw==</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue Id="ID6">AAECAwQFBgcICQoLDA0ODw==</SignatureValue>
<KeyInfo Id="ID7">text<KeyName>KeyName1</KeyName><KeyValue>text<DSAKeyValue><P>AAECAwQFBgcICQoLDA0ODw==</P><Q>AAECAwQFBgcICQoLDA0ODw==</Q><G>AAECAwQFBgcICQoLDA0ODw==</G><Y>AAECAwQFBgcICQoLDA0ODw==</Y><J>AAECAwQFBgcICQoLDA0ODw==</J><Seed>AAECAwQFBgcICQoLDA0ODw==</Seed><PgenCounter>AAECAwQFBgcICQoLDA0ODw==</PgenCounter></DSAKeyValue></KeyValue><RetrievalMethod URI="
http://uri1" Type="
http://uri1" /></KeyInfo>
</Signature>
</FacturaElectronica>
Ese es el xml generado con Visual Studio. Es el de la factura.
Compañeros. Ya consequi un proyecto funcional para la firma del XML. Esta probado, creo que la biblioteca que anda por ahi. No es funcional.
Este es el link.