|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (Visual FoxPro) Insert Signed XML as Base64 Data into Invoice XMLSee more TicketBAI ExamplesDemonstrates how to insert previously signed XML into another XML as base64 data.
 LOCAL loSb1 LOCAL lnSuccess LOCAL loSb2 LOCAL loXml * We wish to create the following XML: * <?xml version="1.0" encoding="UTF-8" standalone="no"?><lrpficfcsgap:LROEPF140IngresosConFacturaConSGAltaPeticion xmlns:lrpficfcsgap="https://www.batuz.eus/fitxategiak/batuz/LROE/esquemas/LROE_PF_140_1_1_Ingresos_ConfacturaConSG_AltaPeticion_V1_0_2.xsd"> * <Cabecera> * <Modelo>140</Modelo> * <Capitulo>1</Capitulo> * <Subcapitulo>1.1</Subcapitulo> * <Operacion>A00</Operacion> * <Version>1.0</Version> * <Ejercicio>2022</Ejercicio> * <ObligadoTributario> * <NIF>79732487C</NIF> * <ApellidosNombreRazonSocial>ARRIOLA LEJARDI ANE</ApellidosNombreRazonSocial> * </ObligadoTributario> * </Cabecera> * <Ingresos> * <Ingreso> * <TicketBai>PD94bWw...ldEJhaT4=</TicketBai> * <Renta> * <DetalleRenta> * <Epigrafe>197330</Epigrafe> * </DetalleRenta> * </Renta> * </Ingreso> * <Ingreso> * <TicketBai>PD94bWw...rZXRCYWk+</TicketBai> * <Renta> * <DetalleRenta> * <Epigrafe>197330</Epigrafe> * <IngresoAComputarIRPFDiferenteBaseImpoIVA>S</IngresoAComputarIRPFDiferenteBaseImpoIVA> * <ImporteIngresoIRPF>400.00</ImporteIngresoIRPF> * </DetalleRenta> * </Renta> * </Ingreso> * </Ingresos> * </lrpficfcsgap:LROEPF140IngresosConFacturaConSGAltaPeticion> * Use this online tool to generate code from sample XML: * Generate Code to Create XML * First get the signed XML created in these other examples * TicketBAI Sign XML Example 1 * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder') loSb1 = CreateObject('Chilkat.StringBuilder') lnSuccess = loSb1.LoadFile("qa_output/signedXml_1.xml","utf-8") * TicketBAI Sign XML Example 2 * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder') loSb2 = CreateObject('Chilkat.StringBuilder') lnSuccess = loSb2.LoadFile("qa_output/signedXml_2.xml","utf-8") * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Xml') loXml = CreateObject('Chilkat.Xml') loXml.Tag = "lrpficfcsgap:LROEPF140IngresosConFacturaConSGAltaPeticion" loXml.AddAttribute("xmlns:lrpficfcsgap","https://www.batuz.eus/fitxategiak/batuz/LROE/esquemas/LROE_PF_140_1_1_Ingresos_ConfacturaConSG_AltaPeticion_V1_0_2.xsd") loXml.UpdateChildContent("Cabecera|Modelo","140") loXml.UpdateChildContent("Cabecera|Capitulo","1") loXml.UpdateChildContent("Cabecera|Subcapitulo","1.1") loXml.UpdateChildContent("Cabecera|Operacion","A00") loXml.UpdateChildContent("Cabecera|Version","1.0") loXml.UpdateChildContent("Cabecera|Ejercicio","2022") loXml.UpdateChildContent("Cabecera|ObligadoTributario|NIF","79732487C") loXml.UpdateChildContent("Cabecera|ObligadoTributario|ApellidosNombreRazonSocial","ARRIOLA LEJARDI ANE") loXml.UpdateChildContent("Ingresos|Ingreso|TicketBai",loSb1.GetEncoded("base64","utf-8")) loXml.UpdateChildContent("Ingresos|Ingreso|Renta|DetalleRenta|Epigrafe","197330") loXml.UpdateChildContent("Ingresos|Ingreso[1]|TicketBai",loSb2.GetEncoded("base64","utf-8")) loXml.UpdateChildContent("Ingresos|Ingreso[1]|Renta|DetalleRenta|Epigrafe","197330") loXml.UpdateChildContent("Ingresos|Ingreso[1]|Renta|DetalleRenta|IngresoAComputarIRPFDiferenteBaseImpoIVA","S") loXml.UpdateChildContent("Ingresos|Ingreso[1]|Renta|DetalleRenta|ImporteIngresoIRPF","400.00") ? loXml.GetXml() lnSuccess = loXml.SaveXml("qa_output/ticketBAI_invoice.xml") RELEASE loSb1 RELEASE loSb2 RELEASE loXml | ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.