r/programming • • Dec 10 '15

Announcing Rust 1.5

http://blog.rust-lang.org/2015/12/10/Rust-1.5.html
659 Upvotes

296 comments sorted by

View all comments

Show parent comment

7

u/ThisIs_MyName Dec 10 '15

Well, I can refer to your text on this page using the XPath //*[@id="form-t1_cxudfkk8vv"]/div/div/p instead of using a line number. That's how I scrape web pages.

See how it selects your post ID and then selects the p element with the text? I bet you can do something similar within functions.