IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  CDATA

    Posted Fri July 28, 2006 04:04 PM

    Hi,

    Requirment is to take data under CDATA.
    In CDATA ,data format is

    CDATA[
    <?xml version="1.0"?>
    

    <ROCKWELL_CANDIDATE>
    2017323
    2530BR

    I am facing problem in removing “<?xml version="1.0"?>” from CDATA section.I am getting data under CDATA section after XSLT transformation,and XSLT transformation automatically write <?xml version="1.0"?> in output file.So after XSLT transformation,i am getting
    file in format as:

    <?xml version="1.0" encoding="UTF-8"?>
    	<?xml version="1.0"?>
    

    <ROCKWELL_CANDIDATE>
    2017323

    my desired output is

    <?xml version="1.0" encoding="UTF-8"?>

    <ROCKWELL_CANDIDATE>
    2017323

    Please help me in solving.

    Thanx


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: CDATA

    Posted Fri July 28, 2006 07:17 PM

    Using the variable $cd to represent your CDATA string, you could use:

    substring-after($cd, ' <?xml version="1.0"?>')

    In general, though, I would say the use of CDATA like this represents a pathology somewhere in the application. (I realize you may have no control over the application generating this.)


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: CDATA

    Posted Fri July 28, 2006 09:47 PM

    <xsl:output omit-xml-declaration=“yes”/>

    Put this after the stylesheet element.


    #webMethods
    #API-Management
    #Tamino