4 Replies Latest reply: Sep 24, 2013 12:24 PM by Invinceable (Vince) RSS

    Remove XML node using Xpath

    Invinceable (Vince)

      Hello,

      I'm using J Developer/SOA Suite 11.1.1.6.0 and BPEL 2.0

       

      I am trying to remove datetime nodes from xml, where the datetime value equals a certain value.  So far I have the following BPEL code:

       

        <assign name="RemoveEmptyDates">

            <extensionAssignOperation>

              <bpelx:remove>

                <bpelx:target>$GetNewHires_GetWrittenOffersReadyForUpload_OutputVariable.parameters//*[ . instance of xsd:dateTime and xsd:dateTime(.) = xsd:dateTime('0001-01-01T00:00:00')]</bpelx:target>

              </bpelx:remove>

            </extensionAssignOperation>

          </assign>

       

      I have tried multiple variations of the predicate, but I can't seem to figure it out.  Right now I am getting an error in J Developer that specifies it is expecting an "]" right after the "//*[." portion of the predicate.  Any ideas on this would be greatly appreciated.

       

      Thanks