XmlExtensionNotificationDataConverter implements ExtensionNotificationDataConverter { @Override public Object convertSynthesizedOutputEvent(SynthesizedOutputEvent output) throws ConversionException { final DocumentBuilderFactory factory = DocumentBuilderFactory .newInstance(); factory.setNamespaceAware(true); try { final DocumentBuilder builder = factory.newDocumentBuilder(); final Document document = builder.newDocument(); final Element data = document.createElementNS(JVXML_MMI_NAMESPACE, "jvxmlmmi:data"); document.appendChild(data); final SpeakableText speakable = getSpeakable(output); if (speakable != null) { final Document ssml = toDocument(speakable); final Node speak = ssml.getFirstChild(); if (speak != null) { document.adoptNode(speak); data.appendChild(speak); } } return data; } catch (ParserConfigurationException e) { throw new ConversionException(e.getMessage(), e); } catch (SAXException e) { throw new ConversionException(e.getMessage(), e); } catch (IOException e) { throw new ConversionException(e.getMessage(), e); } }  @Override Object convertApplicationLastResult(
            final List<LastResult> lastresults); @Override Object convertSynthesizedOutputEvent(SynthesizedOutputEvent output); @Override Object convertSpokenInputEvent(final SpokenInputEvent input); @Override Object convertRecognitionEvent(final DataModel model,
            final RecognitionEvent event); static final String JVXML_MMI_NAMESPACE; }
@Test public void testQueueEmpty() throws Exception { final XmlExtensionNotificationDataConverter converter = new XmlExtensionNotificationDataConverter(); final QueueEmptyEvent empty = new QueueEmptyEvent(null, null); Element element = (Element) converter .convertSynthesizedOutputEvent(empty); System.out.println(toString(element)); }