Re: XML
Tim Walker <[email protected]> Tue, 8 Apr 2003 09:17:53 +1000
| Newsgroups | gmane.comp.handhelds.zaurus.devel |
|---|---|
| Message-ID | <[email protected]> |
QDataStream does have possibilities, in fact I'm quite happy with it's use in my app at the moment (which I implemented in the last day or so). You can maintain versioning control by segmenting the way you you write to the DataStream, and QT writes it in such a way that the data is consistant across multiple platforms (endianness etc). Definately worth looking into, although you loose the absolute portability of xml, most of the functionality is there. Tim On Tue, 8 Apr 2003 06:36 am, [email protected] wrote: > I asked a question along these lines on the Zaurus developer > boards (Spencer what has happened to zaurus.com!! It has been > undergoing maintenance all weekend) recently. While many > peoples apps are using XML they appear to be rolling their own > XML parsers. I was asking for suggestions on which of the many > parsers out there would be best suited to general use and as > such could be made into an ipk for everyone to use. There are > a few libs already available in the debian arm archives. The > benefits are that we don't have to waste precious space on > bundling XML handlers each time. > > I am not yet convinced that internal storage as XML is great > but for import and export it is ideally suited to many > applications. However, if the Z app imports data from a richer > (more recent) DTD, it should not discard those fields/data > items that it does not understand simply because they do not > match its internal data structure. So how do others deal with > this? How do you selectively import, edit and export while > retaining unused data items in t heir proper context?! It is > not insurmountable of course but in the end I suspect it is > just easier to store the XML and compress the data file if it > is likely to start to consume anything above minimal space. A > DOM parser is a damned site easier to use in this context then > farting around with SAX as well, (memory concerns conveniently > ignored >-)) > > Neil > > > > > Neil Horlock > PGP public key available http://www.zyxt.org/nhorlock.asc > or http://www.keyserver.net > Fingerprint: 337A 5258 559A 9C04 3E54 2A01 42B1 E768 DAA7 > 5CBD > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf > > Of Tim Walker > > Sent: Monday, April 07, 2003 11:11 > > To: [email protected] > > Cc: [email protected] > > Subject: Re: [Zaurus-devel] XML > > > > > > > > Hmmn, yeah I've been playing with qconfig and the like, it's > > a bit over the > > top for what I'm trying to do, but usable. > > > > Rik Hemsley suggested QDataStream which also has > > possibility... > > > > I'm very much the perl/php + sql programmer and I get used > > to having a simple > > way of storing, accessing and searching data in an simply > > way. > > > > select * from entries where date='20030505'; > > > > or whatever is rather easy to implement :) > > > > I guess the biggest issue is that I was trying to avoid > > having to create large > > memory structures. For example if someone has 1000 entries > > in this program, > > than that 1000 instances of a class I have to > > implement,sort,save to and read > > from files blah blah. Which is going to chew ram. So > > alternatively I can > > leave it on disk and access each bit as I need, but then > > we're talking disk > > accesses for simple things like grabbing a list of every > > entry. > > > > If I'm willing to load a linked list or whatever into memory > > at startup well > > then QDataStream will probably be the most ecnomical way to > > go... > > > > Tim > > > > On Mon, 7 Apr 2003 07:46 pm, you wrote: > > > Hi Tim, > > > > > > > I'm starting to suspect that xml support in the form of > > > > QDomDocument > > > > > > isn't > > > > > > > > compiled into qtopia-free. > > > > > > You are right, the QDom classes are not part of > > > QtEmbedded. > > > > > > > What are people using the parse/write XML documents on > > > > the Z? OR is > > > > > > there any alternative classes for dumping data to file > > > > easily rather > > > > > > than have to write > > > > my own data file and parsers etc. > > > > > > for simple configuration data, use the Config class, that > > > will read/write the ~/Settings/appname.conf file. It's no > > > XML, > > > > however. If > > > > > you need XML, you have to port > > > some xml class yourself, I am afraid. > > > > > > Eggert > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: ValueWeb: > > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > > No other company gives more support or power for your > > dedicated server > > http://click.atdmt.com/AFF/go/sdnxxaff00300020> > > aff/direct/01/ > > > > > > _______________________________________________ > > Zaurus-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/zaurus-devel > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your > dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Zaurus-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/zaurus-devel ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/