XPath search
WebStorm lets you use XPath 3.0 to find specific XML nodes in XML files in your current project, directory, or within a custom scope.
When you compose an XPath expression, WebStorm provides code completion for XPath axes and checks the expression syntax. It also provides XPath syntax highlighting, which can be customized in
.Before you start
Install and enable the XPathView + XSLT plugin on the Settings/Preferences | Plugins page, tab Marketplace, as described in Installing plugins from JetBrains repository.
Search in XML files
From the main menu, select Find by XPath Expression dialog opens.
. TheType an XPath expression.
For example, the following expression:
//application[@title="BestApp"]/descendant::resourcewill search for
resource
tags that are descendants of anapplication
tag that has an attributetitle
with the valueBestApp
.Choose the scope for the search.
If you select Directory and specify a path to a directory, you can also select the Recursively checkbox to search for nodes in all subdirectories.
The XPath search results are displayed in the Find tool window.