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
  • 1.  Reading and writing null vs. empty XML values ..2

    Posted Mon September 10, 2007 10:59 PM

    When reading XML without a DTD, is it possible to get xmlStringToXMLNode … xmlNodeToDocument to distinguish between the following elements?

    My understanding is that "alpha" should give me a non-null zero-length string, and "bravo" should be null, but I'm getting a zero-length string for both elements.

    Likewise, when writing XML using documentToXMLString, both empty strings and nulls are being written out the same, as "". Again, can this be changed to distinguish the 2 different values?


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 2.  RE: Reading and writing null vs. empty XML values ..2

    Posted Thu September 20, 2007 07:33 AM

    Hello,
    Once you send in put as XML to the service xmlStringToXMLNode … xmlNodeToDocument, automatically document will be created as XML tags given in the input xml file.

    1. if there is starting tag and ending tag with no data (e.g : )

      • that means there if no data and if u check that length that string its ‘0’, but it is not null.
        when it shows that as null ?
        if there is no tag with the name “alpha” in the input then in the target map(if u are using vaue of ‘alfa’) u will get “null”.
    2. means similar to there is no difference in reading those two tags by xmlStringToXMLNode … xmlNodeToDocument services.

    Thanks,
    Ramesh


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Reading and writing null vs. empty XML values ..2

    Posted Thu September 20, 2007 07:35 AM

    Hello,
    Once you send XML data to the service xmlStringToXMLNode … xmlNodeToDocument, automatically document will be created as structure of XML tags given in the input xml file.

    1. if there is starting tag and ending tag with no data (e.g : )

      • that means there if no data and if u check that length that string its ‘0’, but it is not null.
        when it shows that as null ?
        if there is no tag with the name “alpha” in the input then, in the target map if u are using vaue of ‘alfa’ definitly u will get “null”.
    2. means similar to there is no difference in reading those two tags by xmlStringToXMLNode … xmlNodeToDocument services.

    Thanks,
    Ramesh


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 4.  RE: Reading and writing null vs. empty XML values ..2

    Posted Mon October 01, 2007 03:33 AM

    Thank you for your reply Ramesh.

    When I input the following string to the xmlStringToXMLNode…xmlNodeToDocument services, both the “alpha” and “bravo” fields are created in the document with a non-null zero-length string. “bravo” is definitely not null, even though I believe it should be.

    <?xml version="1.0" ?>

    CCC


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Reading and writing null vs. empty XML values ..2

    Posted Mon December 22, 2008 05:18 PM

    A null value in XML is not present at all. is an empty value according to the XML standard, not a null.


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB