Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XPATH 2.0 !

9 views
Skip to first unread message

Andrea Gervasini

unread,
Jun 4, 2015, 12:25:44 PM6/4/15
to
Qualcuno sa suggerirmi una libreria per utilizzare xpath 2.0 con python ?
Oppure qualcuno ha risolto il problema della concatenazione di stringe con lxml ?

Ho un codice xml come il seguente
<a>
<tr>
<td>1</td>
<td>9</td>
<td>8</td>
<td>5</td>
</tr>
<tr>
<td>1</td>
<td>9</td>
<td>8</td>
<td>6</td>
</tr>
</a>

OUTPUT :1985 \n 1986 \n
XPATH : //a/tr/concat(td[1],td[2],td[3],td[4])

Utilizzo lxml in python che mi resituisce :
lxml.etree.XPathEvalError: Invalid expression

Il AquaPath (applicazione macosx) che utlizza xpath 2.0 resituisce il risultato corretto
0 new messages