Re: [xml] How to add datatypes
- From: Csaba Raduly <rcsaba gmail com>
- To: samaram s <samaram007 gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] How to add datatypes
- Date: Fri, 22 Oct 2010 13:41:04 +0200
On Thu, Oct 21, 2010 at 6:01 PM, samaram s wrote:
Thank you so much.
int Val = 10;
If Val is int, you need to transform it into a string. Check the
documentation of itoa and sprintf.
But when i tried as you said, it says 2nd argument should be xmlchar* type
not char* . when i type casted it, it doesn't like it.
Also for xmlNewProp(node, BAD_CAST "Token",Val);
The following worked for me:
xmlNewDocComment(doc, BAD_CAST buffer);
xmlNewProp(node, BAD_CAST "Token", BAD_CAST buffer);
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]