Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

XPath does general data processing not just selection

E.g. when you have a list of numbers on the website, XPath can calculate the sum or the maximum of the numbers

Or you have a list of names "Last name, First name", then you can remove the last name and sort the first names alphabetically. Or count how often each name occurs and return the most popular name.

Then it goes back to selection, e.g. select all numbers that are smaller than the average. Or calculate the most popular name, then select all elements containing that name



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: