[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] XML typing
- From: "Aron Stansvik" <elvstone gmail com>
- To: xml gnome org
- Subject: Re: [xml] XML typing
- Date: Fri, 28 Dec 2007 10:11:43 +0100
2007/12/28, fabio antonini kaskonetworks it <fabio antonini kaskonetworks it>:
> Hi
> I'm a XML newbie and I'm facing the following (trivial)
> problem.
> 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">
> <name>help</name>
> <lmin>4</lmin>
> <maxargs>25</maxargs>
> <rep>1</rep>
> <cmd>do_help</cmd>
> <usage>help - <cli command name> =
> |command_name]</usage>
> <shelp>help - Show help information (for
> 'command')</shelp>
> </command>
>
> 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
want.
Regards,
Aron
> 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 http://xmlsoft.org/
> xml gnome org
> http://mail.gnome.org/mailman/listinfo/xml
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]