Bao Hoang
Bao Hoang

Reputation: 53

Whats the correct Xpath?

<span class="jsx-2465661648"><span class="jsx-2748387826 new-tag">Neu</span>Brunel GmbH NL Bielefeld</span>
<span class="jsx-2465661648">Arvato Supply Chain Solutions</span>

The output should be the strings: "Brunel GmbH NL Bielefeld" "Arvato Supply Chain Solutions"

When i use //span[@class="jsx-2465661648"] i get NEUBrunel GmbH NL Bielefeld which i dont want. How can i extract the text without the new tag "Neu"?

Upvotes: 0

Views: 27

Answers (1)

zx485
zx485

Reputation: 29022

Use this XPath-1.0 expression. It only selects the direct text children.

//span[@class='jsx-2465661648']/text()

Upvotes: 1

Related Questions