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 Gennady Khokhorin <go...@aerometric-ak.com> on 2007/12/20 05:09:45 UTC

put double to node value

Hello, all.
I'm learning this package and can not figure out what is the easiest way
to put double value in the node value?

double 1.1;
DOMNode* node = DOMNodeList->item(i);
node->setNodeValue(...);

Thanks,
gok

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


Re: put double to node value

Posted by Alberto Massari <am...@datadirect.com>.
Hi,
DOM nodes contain only strings, so you need to convert your double into 
a Unicode buffer first (sprintf + XMLString::transcode)

Alberto

Gennady Khokhorin wrote:
> Hello, all.
> I'm learning this package and can not figure out what is the easiest way
> to put double value in the node value?
>
> double 1.1;
> DOMNode* node = DOMNodeList->item(i);
> node->setNodeValue(...);
>
> Thanks,
> gok
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
>   



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