I hope you are doing well. I really need your help on this one, I´ve been working with XML lately but I came across this XML with Namespaces that I don´t understand. I want to extract the values of the response but I don´t know how to do it.
This is the XML and I want to extract the values in "item".
<XMLRESPONSE>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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/" xmlns:tns="urn:wsNotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:GetPersonasResponse xmlns:ns1="wsNotes">
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:registro[1]">
<item xsi:type="tns:registro">
<seguro xsi:type="xsd:string">0</seguro>
<cedula_pasaporte xsi:type="xsd:string">x-xxx-1454</cedula_pasaporte>
<nombre xsi:type="xsd:string">JUANITCO CARDENAS</nombre>
<razon_social xsi:type="xsd:string">GOOGLE</razon_social>
<patrono xsi:type="xsd:string">GOOGLE PA</patrono>
<ruc xsi:nil="true" xsi:type="xsd:string"/>
<direccion xsi:type="xsd:string">AVE. MEXICO Y CL. 33 LOCAL. 07</direccion>
<telefono1 xsi:type="xsd:int">2259444</telefono1>
<telefono2 xsi:nil="true" xsi:type="xsd:int"/>
<fecha xsi:type="xsd:string">1220</fecha>
<salario xsi:type="xsd:decimal">1000</salario>
<promedio_salarial xsi:type="xsd:string">1000</promedio_salarial>
<Seis_Meses_Mas xsi:type="xsd:string">Si</Seis_Meses_Mas>
<Cantidad_Meses xsi:type="xsd:int">15</Cantidad_Meses>
<Historial xsi:type="xsd:string">
Fecha: 1220 Patrono: "APPTIVIDAD" Salario: 5500.00||
Fecha: 1120 Patrono: "APPTIVIDAD" Salario: 5500.00||
Fecha: 0920.0 Patrono: APPTIVIDAD Salario: 5500.00||
Fecha: 0820 Patrono: APPTIVIDAD Salario: 5500.35||
Fecha: 0720 Patrono: APPTIVIDAD Salario: 5500.20||
Fecha: 0620 Patrono: APPTIVIDAD Salario: 5500.01||
Fecha: 0420 Patrono: APPTIVIDAD Salario: 5500.22||
Fecha: 0320 Patrono: APPTIVIDAD Salario: 5500.70||
Fecha: 0120 Patrono: APPTIVIDAD Salario: 5500.97||
Fecha: 1219 Patrono: APPTIVIDAD Salario: 5500.82||
Fecha: 1119 Patrono: APPTIVIDAD Salario: 5500.33||
Fecha: 0919 Patrono: APPTIVIDAD Salario: 5500.25|
</Historial>
<Total_Empleados xsi:type="xsd:int">20</Total_Empleados>
</item>
</return>
</ns1:GetPersonasResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</XMLRESPONSE>
I would appriciate a piece of code on how I could achieve this.
Thanks