/**
* Seek to an identifier in this stream.
*
* @param id The identifier to find.
* @return This {@code FreeColXMLReader} positioned such that the
* required identifier is current, or null on error or if not found.
* @exception XMLStreamException if a problem was encountered
* during parsing.
*/
public FreeColXMLReader seek(String id) throws XMLStreamException {
nextTag();
for (int type = getEventType(); type != XMLEvent.END_DOCUMENT;
type = getEventType()) {
if (type == XMLEvent.START_ELEMENT
&& id.equals(readId())) return this;
nextTag();
}
return null;
}
FreeColXMLReader.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:freecol
作者:
评论列表
文章目录