first commit

This commit is contained in:
2026-02-09 10:55:45 -07:00
commit 7cca957e1a
77 changed files with 44415 additions and 0 deletions

30
HelpersXml/XmlHelper.cs Normal file
View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace EFCDesk.HelpersXml
{
public static class XmlHelper
{
public static string Value(XElement? parent, XName elementName)
=> parent?.Element(elementName)?.Value?.Trim() ?? string.Empty;
public static string Value(XElement? parent, string elementName)
=> parent?.Element(elementName)?.Value?.Trim() ?? string.Empty;
public static decimal? Decimal(XElement parent, XName elementName)
{
var value = Value(parent, elementName);
if (decimal.TryParse(value, out var result))
return result;
return null;
}
public static List<XElement> Elements(XElement? parent, XName elementName)
=> parent?.Elements(elementName)?.ToList() ?? new List<XElement>();
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
namespace EFCDesk.HelpersXml
{
public sealed class XmlNamespaces
{
public readonly XNamespace S =
"http://schemas.xmlsoap.org/soap/envelope/";
public readonly XNamespace ns2 =
"http://www.ventanillaunica.gob.mx/pedimentos/ws/oxml/consultarpedimentocompleto";
public readonly XNamespace ns3 =
"http://www.ventanillaunica.gob.mx/common/ws/oxml/respuesta";
public readonly XNamespace comunes =
"http://www.ventanillaunica.gob.mx/pedimentos/ws/oxml/comunes";
}
}