TransactionXmlReader200 extends AbstractTransactionXmlReader { Insert readInsert( XMLStreamReader xmlStream ) throws NoSuchElementException, XMLStreamException { String handle = xmlStream.getAttributeValue( null, "handle" ); String inputFormat = xmlStream.getAttributeValue( null, "inputFormat" ); String srsName = xmlStream.getAttributeValue( null, "srsName" ); nextElement( xmlStream ); if ( !xmlStream.isStartElement() ) { throw new XMLParsingException( xmlStream, Messages.get( "WFS_INSERT_MISSING_FEATURE_ELEMENT" ) ); } return new Insert( handle, null, inputFormat, srsName, xmlStream ); }  @Override Transaction read( XMLStreamReader xmlStream ); @Override TransactionAction readAction( XMLStreamReader xmlStream ); @Override Filter readFilter( XMLStreamReader xmlStream ); @Override PropertyReplacement readProperty( XMLStreamReader xmlStream );  }
@Test public void testReadInsertWfs200SpecExample1() throws Exception { XMLStreamReader xmlStream = getXMLStreamReader( INSERT_ACTION1 ); Insert insert = reader.readInsert( xmlStream ); assertNull( insert.getHandle() ); assertNull( insert.getInputFormat() ); assertNull( insert.getSrsName() ); xmlStream.require( XMLStreamReader.START_ELEMENT, null, "InWaterA_1M" ); assertNull( insert.getSrsName() ); assertEquals( xmlStream, insert.getFeatures() ); skipElement( xmlStream ); nextElement( xmlStream ); skipElement( xmlStream ); nextElement( xmlStream ); xmlStream.require( XMLStreamReader.END_ELEMENT, WFS_200_NS, "Insert" ); }