Replace any non-ASCII characters in an XML document (as a byte array) with XML character references (where permitted).
Namespace:
FirmaSATAssembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.50.0.29531
Syntax
C# |
---|
public static string Asciify( byte[] xmlData ) |
Visual Basic (Declaration) |
---|
Public Shared Function Asciify ( _ xmlData As Byte() _ ) As String |
Parameters
- xmlData
- Type: array<
System..::.Byte
>[]()[]
Byte array containing XML data
Return Value
XML document as a string with non-ASCII characters replaced by XML character references.
Remarks
(bytes) --> (string)
Examples

byte[] b = File.ReadAllBytes("cfdv40-ejemplo.xml"); string s = Sat.Asciify(b); Console.WriteLine(s); // <?xml version="1.0"?> // <cfdi:Comprobante ... > // <cfdi:Emisor Rfc=" AAA010101AAA" Nombre="Esta es una demostración" RegimenFiscal="622"></cfdi:Emisor> // ... [etc]