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 tuncatunc <at...@gmail.com> on 2008/09/10 17:01:40 UTC

Reading Hexadecimal values

Hi,

In the XML document there is a node 

<numeric value="&#x03C0"> <numeric/>

Trying to read this node with 

org.w3.dom.Element e;
e.getAttribute("value")

returns only "n" as string value.

How can I get the hex value of the node?

Thanks


-- 
View this message in context: http://www.nabble.com/Reading-Hexadecimal-values-tp19414797p19414797.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Reading Hexadecimal values

Posted by ke...@us.ibm.com.
> <numeric value="&#x03C0"> <numeric/>

That's a Numeric Character Reference. XML correctly converted it to the 
reference character.

If you want to represent hex data, don't use &#; -- instead, use some 
other notation and convert it in your application.

______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html)