Home » Java » Generate XPath-like string for object hierarchy

Generate XPath-like string for object hierarchy

Posted by: admin October 22, 2018 Leave a comment

Questions:

I have an object model with a fields like this:

a.getB.getTextField()

What is the simplest way to generate an XPATH-like string for this. Something like
“/a/b/textField” directly from the object or type hierarchy?

Answers: