Re: xml parsing



Simon Fuhrmann wrote:
All I really need is something simple such as was provided by Windows
ini files.

I have something for you if you didn't get lucky with the Glib::KeyFile.
looks like I just did get lucky.  That's the sort of thing I was looking
for.  Unlike some of the other methods out there, this is really easy
and I can figure it out from the examples provided.  I just tried a simple
hello example and it actually worked.  Danke shoen

I have a class that does what you want, you can create hierarchies of
sections with key=value pairs in it. Really easy to use. Take a look here:
Probably the KeyFile will work fine for me but I am curious.  Why did
you make your own class?  Did you add something that KeyFile does not
offer?

I will probably rely mostly on this KeyFile since it is easy and I am
already familiar with that style of ini file.  Still I would like to
learn more about the xml stuff, partly from influence of coworkers.
Unfortunately the xml remains a bit of mystery to me.  So far the
documents are difficult and examples are an odd mixture of simplicity
and complexity.  All the ones I found for libxml just dumped
all the elements of a file.  If I want to approach an xml file
somewhat like I would with the KeyFile where it is really simple
  heading = mykey.get_double( "More", "heading" );
would I have to produce some sort of find function?  Would I have to
read in the entire file as in the example and then do a find for some
particular value?  Does the libxml offer any such method of finding
a value as easily as does Glib::KeyFile::get_value.  If so, such a
method is not obvious from any of the examples I have found.  I would
really like to learn but am not highly motivated to burn countless
hours reverse engineering to figure out what libxml will do.  Thanks
for pointing me to KeyFile


Damon Register


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