# Problem in xpath when having namespaces

**URL:** <https://discuss.elastic.co/t/problem-in-xpath-when-having-namespaces/29543>\
**Category:** Logstash\
**Created:** [September 18, 2015, 7:21am UTC](https://discuss.elastic.co/t/problem-in-xpath-when-having-namespaces/29543 "2015-09-18T07:21:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Post date:** [September 18, 2015, 7:21am UTC](https://discuss.elastic.co/t/problem-in-xpath-when-having-namespaces/29543/1 "2015-09-18T07:21:17Z")

</div>

Hi ,

I am facing some problem when trying to extract the information , without namespaces its working fine ,  
But when using the actual namespces it is not able to extract the information ..  
I have copied the xml example from [here](http://stackoverflow.com/questions/32609055/parsing-xml-document-with-namespace-using-logstash)

> xpath =\>[  
> "/Book/Book/BookDetails/ID/text()","ID",

> ```
> "/Book/Book/BookDetails/Name/text()","Name"
> ]
> 
> ```

This xpath is not working for me , can anyone help me with how to build a xpath with namespaces

---

<div class="post-metadata">

**Author:** ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Post date:** [September 18, 2015, 9:14am UTC](https://discuss.elastic.co/t/problem-in-xpath-when-having-namespaces/29543/2 "2015-09-18T09:14:17Z")

</div>

got the solution...done some changes on xpath, but still wondering why remove\_namespaces =\> true , is not working ?

---

<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:** [July 6, 2017, 5:28am UTC](https://discuss.elastic.co/t/problem-in-xpath-when-having-namespaces/29543/3 "2017-07-06T05:28:44Z")

</div>


