@Test
public void test2() throws XMLStreamException {

	DocumentBuilder documentBuilder;
	try {
		DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
		documentBuilderFactory.setNamespaceAware(true);
		documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
	} catch (ParserConfigurationException e) {
		throw new XMLStreamException(e);
	}
	StringReader json = new StringReader("{\"alice\":{\"@edgar\":\"david\",\"bob\":\"charlie\"}}");
	XMLEventReader reader = new JsonXMLInputFactory().createXMLEventReader(json);
	Document document = documentBuilder.newDocument();
	Node node = document.createElement("foo");
	document.appendChild(node);
	DOMEventConsumer.consume(reader, node);
	
	Node alice = node.getChildNodes().item(0);
	Assert.assertEquals("alice", alice.getLocalName());
	Assert.assertEquals("david", alice.getAttributes().getNamedItem("edgar").getNodeValue());
	
	Node bob = alice.getChildNodes().item(0);
	Assert.assertEquals("bob", bob.getLocalName());		
	Assert.assertEquals("charlie", bob.getTextContent());
}