abc.properties:
engine.xpath=messageHeader/messageId:1234, systemIdentifier/tradeId:4567, .....
我需要从属性中读取多个XPATH:要在XPATH上更改值。
答案 0 :(得分:0)
获得以逗号分隔的属性后,请使用StringTokenizer
:
java.util.StringTokenizer st = new java.util.StringTokenizer(property, ":");
while (st.hasMoreTokens()) {
System.out.println(st.nextToken());
}