# Extract xml attribute from xml

**URL:** <https://discuss.elastic.co/t/extract-xml-attribute-from-xml/257007>\
**Category:** Elasticsearch\
**Created:** [November 29, 2020, 8:57pm UTC](https://discuss.elastic.co/t/extract-xml-attribute-from-xml/257007 "2020-11-29T20:57:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AA\_BB](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aa_bb/32/79871_2.png) [@AA\_BB](https://discuss.elastic.co/u/AA_BB)\
**Post date:** [November 29, 2020, 8:57pm UTC](https://discuss.elastic.co/t/extract-xml-attribute-from-xml/257007/1 "2020-11-29T20:57:48Z")

</div>

I am new to elastic search. Can someone help me to extract XML attributes like **Name, LastName, FatherName** from the below XML file?  
This is the XML which I need to parse:`OUTPUT(20201112 12:15:23.356):[IdExecution: '000012345'][Servicio: 'XMAL098374'][Método: 'BusquedaCliente'][OUT:'<out><NS1:BusquedaP xmlns:NS1="http://www.abcd.gob.ec"><xmlns:ns2>http://www.abcd.gob.ec</xmlns:ns2><return><Calle>METROPOLITANA PASAJE 2000</Calle><CodigoError>000</CodigoError><Condici>AAAAA</Condici><Conyuge>AAAA BBBB CCCC DDDD</Conyuge><Domic>ACX/DDD/SDAA</Domic><Error>CONSULTA REALIZADA.</Error><EstadoC>CASADO</EstadoC><FechaCe>12/05/2016</FechaCe><Fallecimiento> ss</Fallecimiento><Defuncion> asd</Defuncion><FechaNa>28/08/1900</FechaNa><Fir>UDBA</Fir><Foto>AQTX4nVTcZQi7j/2Q==</Foto><Genero> </Genero><Instruccion>BASICA</Instruccion><LugarNa>STUG</LugarNa><NUN>11111</NUN><Nacionalidad>MMMM</Nacionalidad><Name>AAAAAA</Name><LastName>FFFFF</LastName><FatherName>ANIBAL</FatherName><NumeroCasa>SN</NumeroCasa><Profesion>C/0</Profesion><Sexo>MUJER</Sexo></return></NS1:BusquedaP></out>'][ET:'671.904000(ms)'][CodError: '0'][DescError: 'OK']`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 27, 2020, 8:57pm UTC](https://discuss.elastic.co/t/extract-xml-attribute-from-xml/257007/2 "2020-12-27T20:57:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
