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

encoding of ' in TaminoResult

  • 1.  encoding of ' in TaminoResult

    Posted Wed November 14, 2001 08:33 PM

    Hi


    Any one come across this problem of encoding of ' in TaminoResult object;


    Let me explain about this. I am trying to selecting a single node the parameters are passed (OutNode which is a having html tag, String which is “xyz/html”).

    which is following part

    org.w3c.DOM.Node node = org.apache.xpath.XPathAPI.selectSingleNode(outNode, str);

    Once you have this node I want to convert to XMLString object so that it remains with tag. While doing that it encode ’ to ' in content.

    TaminoResult tr1 = new TaminoResult(tamino);
    String selectstr = tr.toXmlString(node);
    out.println(selectstr);

    has any one come across following problem? Your answer to this will be great help.


    Thanks for taking your time.

    Hemant
    :confused:


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


  • 2.  RE: encoding of ' in TaminoResult

    Posted Thu November 15, 2001 08:32 AM

    As far as I can see this behaviour is ok.

    toXMLstring means what it says. That is to say convert to a XML string. In XML ’ may be escaped as &pos; " as " etc. The only reason it may be wrong is if you get something like this


    Then soemthing has gone wrong.

    If you want the text value of a text node you must apply the method getNodeValue()

    for an element containing only text it is something like

    mynode.getFirstChild().getNodeValue()

    what does your XML string look like?


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


  • 3.  RE: encoding of ' in TaminoResult

    Posted Thu November 15, 2001 03:51 PM

    I am running a servlet & Saxon 5.5 Parser to extract instance from Tamino 2.3.1.

    AS I mention in my previous mail that I am doing a select Single node which produces following Text node with proper apos in System.out

    Washington, D. C. Allison’s father

    When I am trying to apply XMLString it produces following result in Browser.

    Washington, D. C. Allison's father

    Let me know if you need more info.

    Thanks for your reply.


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