     [Answers](https://scrapfly.io/blog)   /  [xpath](https://scrapfly.io/blog/tag/xpath)   /  [How to select any element using wildcard in XPath?](https://scrapfly.io/blog/answers/how-to-select-elements-of-any-name-using-wildcards-in-xpath)   # How to select any element using wildcard in XPath?

 by [Bernardas Alisauskas](https://scrapfly.io/blog/author/bernardas) Apr 19, 2023 1 min read [\#xpath](https://scrapfly.io/blog/tag/xpath) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-of-any-name-using-wildcards-in-xpath "Share on LinkedIn")    

 

 

To select elements of any name the wildcard character `*` can be used:

&lt;article&gt; &lt;h1&gt;title&lt;/h1&gt; &lt;p&gt;paragraph&lt;/p&gt; &lt;a&gt;link&lt;/a&gt; &lt;/article&gt; Wildcard character functions just like any other axis selector and can have predicates and filters applied to it. For example, we can restrict our wildcard option to a list of names using the `name()` function:

&lt;article&gt; &lt;h1&gt;title&lt;/h1&gt; &lt;p&gt;paragraph&lt;/p&gt; &lt;a&gt;link&lt;/a&gt; &lt;/article&gt; 

 

    



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

## Explore this Article with AI

 [ ChatGPT ](https://chat.openai.com/?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-of-any-name-using-wildcards-in-xpath) [ Gemini ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-of-any-name-using-wildcards-in-xpath) [ Grok ](https://x.com/i/grok?text=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-of-any-name-using-wildcards-in-xpath) [ Perplexity ](https://www.perplexity.ai/search/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-of-any-name-using-wildcards-in-xpath) [ Claude ](https://claude.ai/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-of-any-name-using-wildcards-in-xpath) 



 ## Related Articles

 [  

 python data-parsing 

### Parsing HTML with Xpath

Introduction to xpath in the context of web-scraping. How to extract data from HTML documents using xpath, best practice...

 

 ](https://scrapfly.io/blog/posts/parsing-html-with-xpath) [  

 data-parsing xpath 

### Ultimate XPath Cheatsheet for HTML Parsing in Web Scraping

Ultimate companion for HTML parsing using XPath selectors. This cheatsheet contains all syntax explanations with interac...

 

 ](https://scrapfly.io/blog/posts/xpath-cheatsheet) [  

 ai 

### What Is MCP? Understanding the Model Context Protocol

What is MCP? Learn how the Model Context Protocol powers tools like Copilot Studio by giving AI models access to real-ti...

 

 ](https://scrapfly.io/blog/posts/what-is-mcp-understanding-the-model-context-protocol) 

  ## Related Questions

- [ Q How to get the name of an HTML element in XPath? ](https://scrapfly.io/blog/answers/how-to-get-name-of-selected-element-in-xpath)
- [ Q How to select element with one of many names in XPath? ](https://scrapfly.io/blog/answers/how-to-select-elements-by-attribute-value-in-xpath)
- [ Q How to find elements by XPath in Puppeteer? ](https://scrapfly.io/blog/answers/how-to-find-elements-by-xpath-in-puppeteer)
- [ Q How to find HTML elements by class? ](https://scrapfly.io/blog/answers/how-to-find-html-elements-by-class)
 
  



   



 Scale your web scraping effortlessly, **1,000 free credits** [Start Free](https://scrapfly.io/register)