Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取标题属性值的XPath表达式_Xpath - Fatal编程技术网

获取标题属性值的XPath表达式

获取标题属性值的XPath表达式,xpath,Xpath,我正在尝试编写一个XPath表达式,返回下面列表项中链接的title属性的值: <li class="ProfileNav-item ProfileNav-item--followers"><a href="/profileurl/followers" data-nav="followers" title="796,433 Followers" class="ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-te

我正在尝试编写一个XPath表达式,返回下面列表项中链接的title属性的值:

<li class="ProfileNav-item ProfileNav-item--followers"><a href="/profileurl/followers" data-nav="followers" title="796,433 Followers" class="ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-textCenter js-tooltip js-openSignupDialog js-nonNavigable u-textUserColor" target=""><span class="ProfileNav-label">Followers</span> <span data-is-compact="true" class="ProfileNav-value">796K</span></a></li>
  • 因此,我正在寻找一个XPath表达式,它将返回“796433追随者”


    如果有人能帮助我,我将不胜感激!非常感谢

    检查
    li
    内的类,并获取
    a
    内标记的
    @title

    //li[contains(@class, "ProfileNav-item")]/a/@title
    

    什么是搜索条件?