public void writeToSerializer( String namespace, XmlSerializer serializer ) throws IOException { // TODO: WARNING! Later versions of plexus-utils psit out an <?xml ?> header due to thinking this is a new // document - not the desired behaviour! SerializerXMLWriter xmlWriter = new SerializerXMLWriter( namespace, serializer ); Xpp3DomWriter.write( xmlWriter, this ); if ( xmlWriter.getExceptions().size() > 0 ) { throw (IOException) xmlWriter.getExceptions().get( 0 ); } }
public void writeText( String text ) { try { serializer.text( text ); } catch ( IOException e ) { storeException( e ); } }
public void addAttribute( String key, String value ) { try { serializer.attribute( namespace, key, value ); } catch ( IOException e ) { storeException( e ); } }
public void writeToSerializer( String namespace, XmlSerializer serializer, Xpp3Dom dom ) throws IOException { // TODO: WARNING! Later versions of plexus-utils psit out an <?xml ?> header due to thinking this is a new // document - not the desired behaviour! SerializerXMLWriter xmlWriter = new SerializerXMLWriter( namespace, serializer ); Xpp3DomWriter.write( xmlWriter, dom ); if ( xmlWriter.getExceptions().size() > 0 ) { throw (IOException) xmlWriter.getExceptions().get( 0 ); } }
public void writeMarkup( String text ) { try { serializer.cdsect( text ); } catch ( IOException e ) { storeException( e ); } }
public void startElement( String name ) { try { serializer.startTag( namespace, name ); elements.push( name ); } catch ( IOException e ) { storeException( e ); } }
public void endElement() { try { serializer.endTag( namespace, (String) elements.pop() ); } catch ( IOException e ) { storeException( e ); } }