@Test
public void test2() throws XMLStreamException {

	StringReader input = new StringReader("<alice><bob>charlie</bob></alice>");
	StringWriter output = new StringWriter();
	XMLEventReader reader = XMLInputFactory.newFactory().createXMLEventReader(input);
	XMLOutputFactory factory = new JsonXMLOutputFactory();
	factory.setProperty(JsonXMLOutputFactory.PROP_MULTIPLE_PI, true);
	XMLEventWriter writer = factory.createXMLEventWriter(output);
	writer = new XMLMultipleEventWriter(writer, false, "/bob");
	writer.add(reader);
	writer.close();
	Assert.assertEquals("{\"alice\":{\"bob\":[\"charlie\"]}}", output.toString());
}