SAX writer. is there a way to choose closing tags?

Posted by OctavioOlguin on 02-Dec-2017 16:11

Greetings ...

had this issue with SAX writer.   currently, I get this output 

<cfdi:Retenciones>
   <cfdi:Retencion Importe="0" TasaOCuota="0" TipoFactor="Tasa" Impuesto="002" Base="0">
   </cfdi:Retencion>
</cfdi:Retenciones>

But I would like to get this..

<cfdi:Retenciones>
   <cfdi:Retencion Importe="0" TasaOCuota="0" TipoFactor="Tasa" Impuesto="002" Base="0" />
</cfdi:Retenciones>

Is there a way to configure sax writer?

Posted by Alex Herbstritt on 05-Dec-2017 06:20
I assume that you are using “START-ELEMENT” and “END-ELEMENT” to write the entry. Instead you can use the method “WRITE-EMPTY-ELEMENT” to get the result that you are looking for.
 
Take a look at the documentation:

All Replies

Posted by Alex Herbstritt on 02-Dec-2017 20:35

I assume that you are using “START-ELEMENT” and “END-ELEMENT” to write the entry. Instead you can use the method “WRITE-EMPTY-ELEMENT” to get the result that you are looking for.

Take a look at the documentation:

https://documentation.progress.com/output/ua/OpenEdge_latest/#page/dvref%2Fwrite-empty-element(-)-method.html%23wwID0EI4XLB

Posted by Alex Herbstritt on 05-Dec-2017 06:20
I assume that you are using “START-ELEMENT” and “END-ELEMENT” to write the entry. Instead you can use the method “WRITE-EMPTY-ELEMENT” to get the result that you are looking for.
 
Take a look at the documentation:
This thread is closed