FirmaSAT Manual

Asciify an XML Document

Replace non-ASCII characters with XML character references.
Reemplazar caracteres no ASCII con referencias de caracteres XML.

In almost all cases, the output contains only US-ASCII characters and can safely be used as input to other functions without concern for character encoding issues. For example, the character "ó" (U+00F3 LATIN SMALL LETTER O WITH ACUTE) is replaced by the XML character reference "ó".

In certain cases, some characters in an XML document cannot be replaced by a numeric character reference, for example where they used in an element or attribute name: Año="2016" or Antigüedad="P3Y2M23D".

New in [v10.0]: This function now converts all non-ASCII characters that can legitimately be converted to numeric character references, and any other non-ASCII characters are left encoded as appropriate for the programming language.

<cfdi:Emisor Rfc="AAA010101AAA" Nombre="Esta es una demostraci&#xF3;n" RegimenFiscal="622"></cfdi:Emisor>
<nomina12:Receptor Curp="OAAJ840102HJCVRN00" Antigüedad="P3Y2M23D" TipoContrato="01" Sindicalizado="S&#xED;" ... >
<nomina12:CompensacionSaldosAFavor SaldoAFavor="123.45" Año="2016" RemanenteSalFav="123.45"></nomina12:CompensacionSaldosAFavor>

Function index by language

Cmd : ASCIIFY Command  
.NET : Sat.Asciify Method (String)   Sat.Asciify Method (Byte[])
VBA/VB6 : satAsciify Function  
C (ANSI) : SAT_Asciify Function  
C++ (STL) : firmasat::Sat::Asciify  
[PREV: Simplified XPath expressions for the elementName parameter...]   [Contents]   [Index]   
   [NEXT: Get Private Key as a String...]

Copyright © 2007-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-04-08T04:07:56Z.