At 04.06 24/08/2006 -0700, fatboyjim wrote:

Using the DOM API, I can successfully add attributes to a node using the
following:

XMLCh *name = XMLString::transcode("Age");
XMLCh *value = XMLString::transcode("Twelve");
element->setAttribute(name, value);

However, what if I have my value held in an integer?
XMLCh *name = XMLString::transcode("Age");
int age = 12;
...
...

How do I go from here? I don't want to use itoa() to convert integer to
ascii

Hi Jim,
you have to provide a textual representation of the number; if you don't want to use the C runtime functions, you can always use XMLString::binToText

Hope this helps,
Alberto

Reply via email to