Blog Archive

Wednesday, May 30, 2018

getting CDATA content from source to target even source has partial escaped xml format

Om

1.source has escape xml format
2. need extract CDATA Content to target.



Source xml

<wsExport xmlns:dyn='http://exslt.org/dynamic'
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
>&#60;![CDATA[&#60;?xml version="1.0" encoding="utf-8"?&#62;
<FMSPOConfirmSchedule xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
        <messageID>282567</messageID>
        <applicationName>FMSPRPOConfirmSchedule</applicationName>
        <PRPOs>
            <PRPO>
                <Brand>ABC</Brand>
                <ecvPONumber>PO0065583</ecvPONumber>
                <sapCoachPONumber>7200000025</sapCoachPONumber>
                <sapPOItemNumber>00040</sapPOItemNumber>
                <ecvLineItem>4</ecvLineItem>
                <ecvLineItemQty>999.000</ecvLineItemQty>
                <currentShipDate>2015-06-15</currentShipDate>
                <currentETA>2018-10-20</currentETA>
            </PRPO>
            <PRPO>
                <Brand>ABC</Brand>
                <ecvPONumber>PO0065583</ecvPONumber>
                <sapCoachPONumber>7200000025</sapCoachPONumber>
                <sapPOItemNumber>00050</sapPOItemNumber>
                <ecvLineItem>5</ecvLineItem>
                <ecvLineItemQty>999.000</ecvLineItemQty>
                <currentShipDate>2018-07-01</currentShipDate>
                <currentETA>2018-10-20</currentETA>
            </PRPO>
            <PRPO>
                <Brand>ABC</Brand>
                <ecvPONumber>PO0065583</ecvPONumber>
                <sapCoachPONumber>7200000025</sapCoachPONumber>
                <sapPOItemNumber>00060</sapPOItemNumber>
                <ecvLineItem>6</ecvLineItem>
                <ecvLineItemQty>999.000</ecvLineItemQty>
                <currentShipDate>2018-07-15</currentShipDate>
                <currentETA>2018-10-20</currentETA>
            </PRPO>
        </PRPOs>
    </FMSPOConfirmSchedule>
    ]]&#62;</wsExport>
xslt mapping
    <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dyn="http://exslt.org/dynamic" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  version="1.0">

  <xsl:output method="xml"/>


  <xsl:template match="/wsExport">
  <xsl:copy-of select="*" />
  </xsl:template>

</xsl:stylesheet>

   

No comments:

Post a Comment