You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Vipul <vv...@unwiredsoft.com> on 2001/02/01 07:42:30 UTC

org.apache.xerces.utils.QName?

Hi,
the class org.apache.xerces.utils.QName (xerces 1.2.2) takes in localpart,
prefix, rawname, uri as int. why is it so? how do i make a
org.apache.xerces.utils.QName for which the rawname is a string like
"newnode" ? basically what int's do i pass so that the rawname is a
representation of the string "newnode"? CAn any1 please explain ???


Vipul Veera

UnwiredSoft Inc.
http://www.unwierdsoft.com


Re: org.apache.xerces.utils.QName?

Posted by Andy Clark <an...@apache.org>.
Vipul wrote:
> the class org.apache.xerces.utils.QName (xerces 1.2.2) takes in localpart,
> prefix, rawname, uri as int. why is it so? how do i make a
> org.apache.xerces.utils.QName for which the rawname is a string like
> "newnode" ? basically what int's do i pass so that the rawname is a
> representation of the string "newnode"? CAn any1 please explain ???

The concept of a string pool was introduced for performance
reasons. All strings are given a unique identifier and that
is what the integer means. If you want to get the string
for that identifier, then you need a reference to the
StringPool object to call the toString(int) method.

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org