You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Felix Planjer <fe...@yellowred.nl> on 2004/08/19 16:09:07 UTC
Special characters as question marks?
Hi,
I've been trying to figure this out for a few days now, and cannot find
the solution.
Our xml document has element like to following in it:
<comp>≤</comp>
The &x2264; if the lower(or higher?)-equal character.
When using xalan to create html from this the browser displays the correct
character. If I serialize the DOMDocument, it write &x2264; to the file.
This all works fine.
The problem is with the following code:
Node compNode = XPathAPI.selectSingleNode(item,
"./atp_specification_comparator1/text()");
String comp = comp.getNodeValue()
The comp string contains the character '?' instead of something I can use.
We're using jre1.3.1 and xerces 2.6.2
How can I read the correct character from the xmlDocument?
regards,
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Special characters as question marks?
Posted by Bob Foster <bo...@objfac.com>.
The value ≤ can't be contained in a byte (0-256).
Bob Foster
http://xmlbuddy.com
Felix Planjer wrote:
>I could be wrong, but I've tested it and am fairly sure the string
>contains '?'.
>
>If I output:
>comp.getNodeValue().getBytes()[0]
>
>it has the value 63, which is the byte value of an '?'
>
>
>
>
>
>>
>>
>>Are you sure the string contains the '?' character, rather than the tool
>>you're using to display that character displaying it as '?'...? The
>>former would be hard to explain; the latter is a fairly common problem.
>>
>>______________________________________
>>Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
>>"The world changed profoundly and unpredictably the day Tim Berners Lee
>>got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Special characters as question marks?
Posted by Felix Planjer <fe...@yellowred.nl>.
I could be wrong, but I've tested it and am fairly sure the string
contains '?'.
If I output:
comp.getNodeValue().getBytes()[0]
it has the value 63, which is the byte value of an '?'
>
>
>
>
> Are you sure the string contains the '?' character, rather than the tool
> you're using to display that character displaying it as '?'...? The
> former would be hard to explain; the latter is a fairly common problem.
>
> ______________________________________
> Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
> "The world changed profoundly and unpredictably the day Tim Berners Lee
> got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Special characters as question marks?
Posted by Joseph Kesselman <ke...@us.ibm.com>.
Are you sure the string contains the '?' character, rather than the tool
you're using to display that character displaying it as '?'...? The former
would be hard to explain; the latter is a fairly common problem.
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org