C#C
C#3y ago
120 replies
Pold

❔ Help deserializing XML file

Hello,
I've been trying to deserialize the following XML, using System.Xml, no external libraries:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope 
    xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:ns1='urn:WsLMEInet'
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
    SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
    <SOAP-ENV:Body>
        <ns1:LMEEvenFecResponse>
            <LMEEvenFecReturn xsi:type='ns1:LMEEvenFecResponse'>
                <Estado xsi:type='xsd:integer'>0</Estado>
                <GloEstado xsi:type='xsd:string'>Sin Error</GloEstado>
                <ListaLicencias SOAP-ENC:arrayType='ns1:LicenciaType[139]' xsi:type='ns1:ListaLicenciasType'>
                    <item xsi:type='ns1:LicenciaType'>
                        <NumLicencia xsi:type='xsd:integer'>2780337</NumLicencia>
                        <DigLicencia xsi:type='xsd:string'>7</DigLicencia>
                        <estado xsi:type='xsd:integer'>1</estado>
                        <fecha xsi:type='xsd:dateTime'>2023-01-04T15:47:17</fecha>
                    </item>
                    <item xsi:type='ns1:LicenciaType'>
                        <NumLicencia xsi:type='xsd:integer'>2780338</NumLicencia>
                        <DigLicencia xsi:type='xsd:string'>5</DigLicencia>
                        <estado xsi:type='xsd:integer'>1</estado>
                        <fecha xsi:type='xsd:dateTime'>2023-01-04T15:47:18</fecha>
                    </item>
                </ListaLicencias>
            </LMEEvenFecReturn>
        </ns1:LMEEvenFecResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>



I haven't been able to get this value SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'.

Some help would be great.
Was this page helpful?