public void processingInstruction(String target, String data) { // simplify logic???? into two cases in and not in DTD // ditto for comment() method and superclass if (!inDTD) flushText(); else if (!inInternalSubset()) return; ProcessingInstruction result = ProcessingInstruction.build(target, data); if (!inDTD) { if (inProlog) { parent.fastInsertChild(result, position); position++; } else { parent.fastInsertChild(result, parent.getChildCount()); } } else { internalDTDSubset.append(" "); internalDTDSubset.append(result.toXML()); internalDTDSubset.append("\n"); } }