Skip to content

Xpath方式如何根据标签的问题抽取标签的内容 #460

@louant

Description

@louant

如以下标签

 <dd style='margin-bottom: .5em'>
                                    <a href="http://www.7-zip.org/" itemprop="url">
                                        <i class='icon-external-link'>&nbsp;</i>
                                        Homepage
                                    </a>
                                    <br />
                                    <a href="http://www.7-zip.org/">
                                        <i class='icon-external-link'>&nbsp;</i>
                                        Download
                                    </a>
                                    <br />
                                    <a href='/p/sevenzip/links'>
                                        Forums
                                        <i>( 2 Links )</i>
                                    </a>
                                    <br />

                                </dd>

如何抽取到文本内容为Homepage的a标签的href?
使用注解的方式ExtractBy("//a[contains(text(),'Homepage')]/@href")是不行的

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions