So, I am sure there has to be an easy way and it must be possible, but I want to scrap a small piece of information from a web page. The page is html obviously, and with XPath I should be able to get to the exact element in that page, and then I want the value in there, and automatically create a simple Java Value Object to hold that piece of information.
I want to use Jaxb 2 with an annotation on the Value Object class, so I can just call an unmarshaller to get the data from the HTML to the Java object.
Does anyone have a good link to an example code like this?
Not sure if it satisfies your definition of "Java Value Object", but both TagSoup and NekoHTML can make a DOM object out of HTML (after regularizing it). So you would get a Node or Element object to play with.