private void writeAttributes(int item, XMLStreamWriter writer) throws XMLStreamException { do { switch(getAIIState(item)) { case STATE_ATTRIBUTE_U_LN_QN: { final String uri = readStructureString(); final String localName = readStructureString(); final String prefix = getPrefixFromQName(readStructureString()); writer.writeAttribute(prefix,uri,localName,readContentString()); break; } case STATE_ATTRIBUTE_P_U_LN: writer.writeAttribute(readStructureString(), readStructureString(), readStructureString(), readContentString()); break; case STATE_ATTRIBUTE_U_LN: writer.writeAttribute(readStructureString(), readStructureString(), readContentString()); break; case STATE_ATTRIBUTE_LN: writer.writeAttribute(readStructureString(), readContentString()); break; } // Ignore the attribute type readStructureString(); readStructure(); item = peekStructure(); } while((item & TYPE_MASK) == T_ATTRIBUTE); } }
readStructure(); //skip break; case STATE_ELEMENT_U_LN_QN: break; case STATE_COMMENT_AS_CHAR_ARRAY_SMALL: { readStructure(); final int length = readStructure(); final int start = readContentCharactersBuffer(length); final String comment = new String(_contentCharactersBuffer, start, length); readStructure(); final int length = readStructure16(); final int start = readContentCharactersBuffer(length); readStructure(); final char[] ch = readContentCharactersCopy(); writer.writeComment(new String(ch)); readStructure(); writer.writeProcessingInstruction(readStructureString(), readStructureString()); break; case STATE_END: // done readStructure(); writer.writeEndDocument(); return;
readStructure(); // skip STATE_DOCUMENT final int length = readStructure(); final int start = readContentCharactersBuffer(length); writer.writeCharacters(_contentCharactersBuffer,start,length); final int length = readStructure(); final int start = readContentCharactersBuffer(length); final String comment = new String(_contentCharactersBuffer, start, length);
readStructure(); // skip STATE_DOCUMENT final int length = readStructure(); final int start = readContentCharactersBuffer(length); writer.writeCharacters(_contentCharactersBuffer,start,length); final int length = readStructure(); final int start = readContentCharactersBuffer(length); final String comment = new String(_contentCharactersBuffer, start, length);