[maemo-developers] [maemo-developers] XML Question
From: Karoliina Salminen karoliina at karoliinasalminen.comDate: Mon Jul 17 18:38:36 EEST 2006
- Previous message: [maemo-developers] XML Question
- Next message: [maemo-developers] Where to find Maemo rootstrap-files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, >> i need a tool, written in c, to create an xml document automatically >> with c commands. Does anyone know if there is one available in maemo or >> i should create my own? > > libxml is shipped with the product libxml is really good and pretty easy and straightforward to use and quite well documented. However, if you want to create some simple xml, libxml is easier to use for reading it than for writing it. I do in our 770-EFIS-display -program so that I use libxml2 for reading the settings xml-file and for writing I just use simply fprintf statements. The file is very simple and it is just about 10 lines of fprintf... Depends on how you want to create your file, do it quickly and simply or do it elegantly and more lengthy way with the library. I have used libxml2 for writing document in another project of mine. I use the DOM-parser, it is the easiest way to parse or write xml (IMHO). SAX-parser saves propably memory in some cases though. The choice is yours and depends on your application and its goals (for reading 10 lines of XML to DOM tree doesn't eat too much memory and thus is no big deal, but if you are handling like 10 MB documents, you may enter into trouble with the DOM-parser because it reads everything into memory at once). Best Regards, Karoliina --- http://www.karoliinasalminen.com/blog
- Previous message: [maemo-developers] XML Question
- Next message: [maemo-developers] Where to find Maemo rootstrap-files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]