element.addContent(new EntityRef(er.getName(), er.getDeclaration().getPublicId(), er.getDeclaration().getSystemId()));
break;
case XMLStreamConstants.PROCESSING_INSTRUCTION:
javax.xml.stream.events.ProcessingInstruction pi = (javax.xml.stream.events.ProcessingInstruction)currentEvent;
element.addContent(new ProcessingInstruction(pi.getTarget(), pi.getData()));
break;
case XMLStreamConstants.START_ELEMENT:
element.addContent(readElement());