Marco Lagalla
Marco Lagalla

Reputation: 21

Jsoup matching tag with column

for a school project i need to parse arXiv.org API response code, to harvest some informations. I'm using Jsoup and i'm stuck on a problem:

I have a tag like this:

String value = document.select("arxiv:comment").text();

But this give me this error:

Exception in thread "main" org.jsoup.select.Selector$SelectorParseException: Could not parse query 'arxiv:comment': unexpected token at ':comment'

Upvotes: 1

Views: 56

Answers (1)

Marco Lagalla
Marco Lagalla

Reputation: 21

I have found the solution:

The right syntax to match a tag like <tag:aa>..</tag:aa> is:

$document.select("tag|aa").text();

Upvotes: 1

Related Questions