StreamResult result = new StreamResult(xmlout);
transformer.transform(new DOMSource(doc.getFirstChild()), result);
ManagedConnectionPoolStatistics rawStatistics = (ManagedConnectionPoolStatistics)getServer().invoke(POOL_NAME, RAW_STATS_METHOD, new Object[0], new String[0]);
JBossXmlSubPoolStatisticFormatter xmlFormatter = new JBossXmlSubPoolStatisticFormatter();
String xml2 = (String)xmlFormatter.formatSubPoolStatistics(rawStatistics);
Document doc2 = builder.parse(new InputSource(new StringReader(xml2)));
StringWriter xmlout2 = new StringWriter();