Question

Étant donné la structure XML suivante

<html>
  <body>
    <div>
      <span>Test: Text2</span>
    </div>
    <div>
      <span>Test: Text3</span>
    </div>
    <div>
      <span>Test: Text5</span>
    </div>
  </body>
</html>

Quelle est la meilleure requête XPath pour localiser un span dont le texte commence par Test ?

Autres conseils

L'option valide est également:

//span[contains(.,'Test')]
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top