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.

 View Only
Expand all | Collapse all

How to get a cdata-section from a element ?

  • 1.  How to get a cdata-section from a element ?

    Posted Fri February 21, 2003 02:00 PM

    I desperately try to write a script which extracts a cdata-section from element (with QuiP 2.2.1).

    Some text which include a
    <![CDATA[
    cdata-section
    ]]>


    What I would like to to is to transform this XML fragment in something like :

    Some text which include a


    cdata-section


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: How to get a cdata-section from a element ?

    Posted Sat February 22, 2003 12:55 PM

    CDATA sections aren’t represented in the XPath/XQuery data model - the information is discarded by the XML parser. You can’t tell whether data was originally written in a CDATA section or not, any more than you can tell whether a space was written as a true space or as the character reference . Essentially, CDATA sections (like character references) are regarded as a keyboard shortcut when entering XML, not as something that carries information.

    This has always been true of XPath 1.0 and it is equally true of XQuery 1.0. If this information is significant to applications, you will have to find some other way of representing it in your XML markup.

    Regards,

    Michael Kay


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: How to get a cdata-section from a element ?

    Posted Sat February 22, 2003 12:57 PM

    In my previous post, I wrote

    “as the character reference & x 2 0 ;”, but the forum software mangled it.

    Michael Kay


    #webMethods
    #Tamino
    #API-Management