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);
has any one come across following problem? Your answer to this will be great help.
Thanks for taking your time.
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
what does your XML string look like?
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.