Re: [xml] XML typing

2007/12/28, fabio antonini kaskonetworks it <fabio antonini kaskonetworks it>:
I'm a XML newbie and I'm facing the following (trivial)
I have read and implemented the XMLTutorial. Now I want to
use libxml for reading a XML file I have created. The XML
file seems like that

        <command CMD="CMD_TBL_HELP">
                <usage>help - &lt;cli command name&gt; =
                <shelp>help - Show help information (for

The XML file includes both strings and decimal value.
I have no problem to parse the string values (usage or shelp
fields), but
how can I import the decimal fields as "rep" or "maxargs".
When I parse the file their value is always a string. I
would like to import their decimal value.

This is not a libxml2 question, but a general C programming question.
Converting strings to numbers can be done using functions in your
standard C library. Look at the manual pages for strotol() for
instance. What function to use depends on what type of conversion you


Sorry if this question is really trivial, but I'm a beginner
at the moment
Any help will be appreciated.
With regards

Fabio Antonini
xml mailing list, project page
xml gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]