/**
* Close the current tag, but accept some alternative elements first.
*
* @param tag The expected tag to close.
* @param others Alternate elements to accept.
* @exception XMLStreamException if a closing tag is not found.
*/
public void closeTag(String tag, String... others) throws XMLStreamException {
for (int next = nextTag(); next != XMLStreamConstants.END_ELEMENT;
next = nextTag()) {
String at = find(others, s -> atTag(s));
if (at == null) {
throw new XMLStreamException("Parse error, END_ELEMENT(" + tag
+ " or alternatives) expected, not: " + getLocalName());
}
closeTag(at);
}
expectTag(tag);
}
FreeColXMLReader.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:freecol
作者:
评论列表
文章目录