You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Neil Sherman <ns...@aimltd.co.uk> on 2001/12/14 11:08:23 UTC
Reading attribute values with leading spaces
Hi all,
I have an attribute value that has leading spaces and I would like to
maintain those leading spaces when I read in the value, but Xerces seems to
strip the leading spaces from the string that I get back! i.e.
<XMLTAG attribute=" value"></XMLTAG>
I then obtain this attribute value with:
string = attribs.getNamedItem("attribute").getNodeValue().transcode();
But what I get back is:
"value" and NOT " value"
Is there anyway around this? The obvious solution is to place a character
at the front that can then be stripped off, thus retaining the spaces but I
was wondering if there is a better solution ??
Many thanks
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org