Validate an XML file against SAT specifications.
Namespace: FirmaSATAssembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntaxpublic static int ValidateXml(
string xmlFile,
XmlOption xmlOpt = XmlOption.Default
)
Public Shared Function ValidateXml (
xmlFile As String,
Optional xmlOpt As XmlOption = XmlOption.Default
) As Integer
Parameters
- xmlFile String
- Name of input XML file to be processed (or a string containing XML data)
- xmlOpt XmlOption (Optional)
- Option for strict or loose XML restrictions (optional, default=Strict)
Return Value
Int320 if successful or non-zero
error code
RemarksThis just validates the XML structure, not the signature.
Exampleint n = Sat.ValidateXml("cfdv40-ejemplo.xml");
Console.WriteLine("Sat.ValidateXml returns {0}", n);
int n = Sat.ValidateXml("cfdv40-iedu-badcurp.xml");
Console.WriteLine("Sat.ValidateXml returns {0}", n);
Console.WriteLine(General.ErrorLookup(n));
Console.WriteLine(General.LastError());
int n = Sat.ValidateXml("cfdv40-iedu-badcurp.xml", XmlOption.Loose);
Console.WriteLine("Sat.ValidateXml(Loose) returns {0}", n);
See Also