private void readSourcePosition(MAnnotatedElement element)
throws XMLStreamException
{
assertStart(SOURCEPOSITION);
MSourcePosition pos = element.createSourcePosition();
nextElement();
if (LINE.equals(getElementName())) {
pos.setLine(assertCurrentInt(LINE));
}
if (COLUMN.equals(getElementName())) {
pos.setColumn(assertCurrentInt(COLUMN));
}
if (SOURCEURI.equals(getElementName())) {
try {
pos.setSourceURI(new URI(assertCurrentString(SOURCEURI)));
} catch(URISyntaxException use) {
throw new XMLStreamException(use);
}
}
assertEnd(SOURCEPOSITION);