new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
properties.addEncryptionPart(securePart);
OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
InputStream sourceDocument =
this.getClass().getClassLoader().getResourceAsStream(
"ie/baltimore/merlin-examples/merlin-xmlenc-five/plaintext.xml");
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);