/** Prepare to start an element, by allocating stack space. */ protected void beforeStartElement() { beforeMarkup(); if (stack.length <= depth + 1) { // Allocate more space for the stack: int[] newStack = new int[stack.length * 2]; System.arraycopy(stack, 0, newStack, 0, stack.length); stack = newStack; } stack[depth + 1] = 0; // nothing written yet }
public void writeStartDocument() throws XMLStreamException { beforeMarkup(); out.writeStartDocument(); afterMarkup(); }
public void writeStartDocument(String version) throws XMLStreamException { beforeMarkup(); out.writeStartDocument(version); afterMarkup(); }
public void writeEmptyElement(String localName) throws XMLStreamException { beforeMarkup(); out.writeEmptyElement(localName); afterMarkup(); }
public void writeStartDocument(String encoding, String version) throws XMLStreamException { beforeMarkup(); out.writeStartDocument(encoding, version); afterMarkup(); }
public void writeComment(String data) throws XMLStreamException { beforeMarkup(); out.writeComment(data); afterMarkup(); }
public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException { beforeMarkup(); out.writeEmptyElement(namespaceURI, localName); afterMarkup(); }
public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { beforeMarkup(); out.writeEmptyElement(prefix, localName, namespaceURI); afterMarkup(); }
public void writeProcessingInstruction(String target) throws XMLStreamException { beforeMarkup(); out.writeProcessingInstruction(target); afterMarkup(); }
public void writeProcessingInstruction(String target, String data) throws XMLStreamException { beforeMarkup(); out.writeProcessingInstruction(target, data); afterMarkup(); }
public void writeDTD(String dtd) throws XMLStreamException { beforeMarkup(); out.writeDTD(dtd); afterMarkup(); }