Home getting the next element with xpath

# getting the next element with xpath

user2734
1#
user2734 Published in April 22, 2018, 12:52 am
 I have the following html block, I'm trying to get all the city links under Alabama in this case. This is the xpath I have constructed //h3/a[contains(text(),'Alabama')]/following::ul/li/a  But The xpath above matches too many things. Any idea what I am doing wrong?   I want the following to be selected as an array in this case. I want to extract each city link. I am using xpath inside of Java 
• Auburn
• Birmingham
• Dothan
•