3 Replies Latest reply: Nov 2, 2012 1:55 AM by Peter van Nes at The Future Group RSS

    How to escape XML in BPEL?

    Peter van Nes at The Future Group
      I have a part of a outputmessage in an element HTML of xsd:any. This element contains HTML which i have to transform to escaped XML.
      Therefore i created the following embedded java code.

      String htmlContent = ((oracle.xml.parser.v2.XMLElement)getVariableData("l_GetBericht_Output","reply","/ns5:GetBerichtResponse/ns14:Bericht/ns14:HTML")).getFirstChild().getNodeValue() ;
      htmlContent.replaceAll("<","&lt;") ;
      htmlContent.replaceAll(">","&gt;") ;

      Message in l_GetBericht_Output starts with;

      <part name="reply">
      de heer ...

      The result of the selection in BPEL variable TestHTMLContent is empty though.
      Anyone any thoughts ?

      Is there a better way to transform XML to escaped XML ?
      Why is my selection null ?