# X-Path Wildcard

**URL:** <https://discuss.elastic.co/t/x-path-wildcard/244352>\
**Category:** Logstash\
**Created:** [August 10, 2020, 7:05am UTC](https://discuss.elastic.co/t/x-path-wildcard/244352 "2020-08-10T07:05:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bevano](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bevano](https://discuss.elastic.co/u/bevano)\
**Post date:** [August 10, 2020, 7:05am UTC](https://discuss.elastic.co/t/x-path-wildcard/244352/1 "2020-08-10T07:05:16Z")

</div>

Hey,

Was wondering whether someone could help me with the following xpaths since I dont have much experience. I am trying to get the value of /eCloud1/CloudMsg/\*/name() but this field can be 16 different values. I don't think the wildcard is allowed in logstash (it errors out), but i am not sure how to get the name?

Payload 1  
`<eCloud1> <CloudMsg> <PollRequest> <SrcCloudID>12345-12-12-12</SrcCloudID> <MsgSeq>12345-12345-12354-12345-12345</MsgSeq> </PollRequest> </CloudMsg> </eCloud1>`

Payload 2  
`<eCloud1> <CloudMsg> <PosMsg> <SrcCloudID>12345-12-12-12</SrcCloudID> <MsgSeq>12345-12345-12354-12345-12345</MsgSeq> </PosMsg> </CloudMsg> </eCloud1>`

---

<div class="post-metadata">

**Author:** ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)\
**Post date:** [August 10, 2020, 7:55am UTC](https://discuss.elastic.co/t/x-path-wildcard/244352/2 "2020-08-10T07:55:08Z")

</div>

That's xpath 2.0. Maybe the xpath 1.0 version will work:  
`name(/eCloud1/CloudMsg/*)`

---

<div class="post-metadata">

**Author:** ![bevano](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bevano](https://discuss.elastic.co/u/bevano)\
**Post date:** [August 10, 2020, 8:08am UTC](https://discuss.elastic.co/t/x-path-wildcard/244352/3 "2020-08-10T08:08:31Z")

</div>

Brilliant @Jenni. Thanks for your help again. Can I assume logstash only supports xpath 1.0 version? Or is it kind of a grey area on what is supported and what isn't

---

<div class="post-metadata">

**Author:** ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)\
**Post date:** [August 10, 2020, 8:48am UTC](https://discuss.elastic.co/t/x-path-wildcard/244352/4 "2020-08-10T08:48:48Z")

</div>

I wasn't sure before because I rarely use it, but it seems like it really only supports 1.0 😑

> <https://github.com/logstash-plugins/logstash-filter-xml/issues/64>
>
> XPath 1.0 is pretty outdated these days, unfortunately newer versions are not supported.
> Nokogiri is currenlty based on Xalan, which hasn't been...

---

<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:** [September 7, 2020, 8:48am UTC](https://discuss.elastic.co/t/x-path-wildcard/244352/5 "2020-09-07T08:48:53Z")

</div>

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