Pessoal, estou utilizando JAXB, sendo :
JAXBContext jc = JAXBContext.newInstance(Globals.XML_PROTESTO_DIR);
Marshaller marshaller = jc.createMarshaller();
JAXBElement<Pedido> element = new ObjectFactory().createSolicitacaoProtesto(pedido);
marshaller.marshal(element, System.out);
Preciso capturar esta saida de System.out e armazenar em uma String, alguem pode ajudar ?
marshaller.marshal(element, System.out);