Click or drag to resize

SatAsciify(Byte) Method

Replace any non-ASCII characters in an XML document (as a byte array) with XML character references (where permitted).

Namespace: FirmaSAT
Assembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntax
public static string Asciify(
	byte[] xmlData
)

Parameters

xmlData  Byte
Byte array containing XML data

Return Value

String
XML document as a string with non-ASCII characters replaced by XML character references.
Remarks
(bytes) --> (string)
Example
C#
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&#xF3;n" RegimenFiscal="622"></cfdi:Emisor>
// ... [etc]
See Also