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.  TEXT Node Value

    Posted Thu October 04, 2001 11:57 AM

    Anyone know what is the return value of a text node from TaminoResult.getElement() or DOM result if it is empty?

    I am able to detect some “\n” but some TEXT Nodes that has a null values are unable to be detected.

    I tried to cdo this
    if ( textNode.getNodeValue().equals(“\t”)||
    textNode.getNodeValue().equals(" “)||

    ”\n" - some can be detected
    others no.

    any reason?? cos i need to traverse the tree and ignore TEXT nodes that are empty.

    regards

    cheers !


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 2.  RE: TEXT Node Value

    Posted Fri October 05, 2001 12:33 PM

    Maybe your text node does not contain one “\t” or one " “, maybe it contains both. So you should try to do conventional whitespace stripping, which means to remove all " “, “\t”, “\n”, “\r” characters. The String.trim() method should do that for you:

    if ( textNode.getNodeValue().trim().equals(””) ) {

    }


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 3.  RE: TEXT Node Value

    Posted Thu October 11, 2001 08:09 PM

    hi Chaudhuri

    Danke! will try it out tomorrow.
    Wonderful!

    regards

    cheers !


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management