Setting Attribute Values - Using Integers

View: New views
2 Messages — Rating Filter:   Alert me  

Setting Attribute Values - Using Integers

by Gupta, Raman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

First, I want to apologize in advance if this is the wrong place to be asking this question.

 

I am currently using the gdome library to write and parse XML data which should follow a predefined schema. The schema specifies that some of the attributes are to be entered as integers, but as I understand the API, I can only set attribute values as strings. I thought that maybe GdomeDOMString would somehow figure out what data type the attribute should be, but I could not find how to point gdome to the schema so it would have no idea that the attribute should be an integer and not a string.

 

So my question is, can I:

 

1)       Somehow tell gdome to use my schema so that it will automatically make it an integer

Or

2)       Tell gdome to set an integer value for the attribute?

 

I hope my question is clear enough, and if it is not, please let me know and I will do my best to phrase it better. Thanks in advance for your help!

 

Raman Gupta


_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Setting Attribute Values - Using Integers

by Luca Padovani-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello Gupta,

On Jun 26, 2007, at 10:56 PM, Gupta, Raman wrote:
> 1)       Somehow tell gdome to use my schema so that it will  
> automatically make it an integer
no
> 2)       Tell gdome to set an integer value for the attribute?

no. Gdome is totally oblivious to the schema of the document being  
accessed or modified, and it performs no automatic conversion of  
data. You have to use strings and do the conversion yourself. As far  
as I know, all (most?) DOM implementations behave like this.

Best,
--luca


_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome