public String toXml() throws ParserConfigurationException,
FactoryConfigurationError, TransformerException
{
XMLBuilder builder = XMLBuilder.create("NotificationConfiguration");
for (TopicConfig topicConfig: this.topicConfigs) {
builder
.elem("TopicConfiguration")
.elem("Topic").text(topicConfig.topic).up()
.elem("Event").text(topicConfig.event);
}
return builder.asString();