On Mon, Feb 28, 2011 at 3:10 PM, Rui Miguel Silva Seabra <[email protected]> wrote:
> Em 28-02-2011 18:09, Gustavo Sverzut Barbieri escreveu:
>>
>> Don't get me wrong. I had to work with XML extensively in the past and
>> I used libxml2 myself. It was cumbersome to use, but managed to do
>> complex things like XPath to refer to nodes, all types of DOM queries,
>> etc. It is useful, but not every project will use it.
>
> Any XML parser is a bit cumbersome, I only see any value of using eina if it
> hides the cumbersomeness of XML parsers.

I have a tree construction if you know your documents are handled
nicely (most should be). It will allocate memory, that then you need
to iterate, then iterate again to free... but maybe it pays off if you
can be inefficient.


> However the instant you need that little extra that your parser doesn't do,
> you're adding another lib.
>
> Real life tells me that this is a lot more common problem than not (eg, word
> processor features, everybody uses a different set of 10% of them).

Care to provide examples in those use cases I've mentioned? Even in
twitter/identica xml responses. The thing is that those constructions
are HARD to generate properly, XML is painful to work directly, thus
most people auto-generate it and do not include these things.
Entities, for instance, is the XML counterpart of Edje file
cpp-macros... it's excellent if you're typing things over and over
manually, but once you add tools to generate it, you're not doing any
of those as figuring out what could be condensed into an entity is not
worth the pain.

OTOH I can offer you yet another example this simple lib would cover:
Evas/Edje TEXTBLOCK, both have that xml-like format, this parser could
be used for them, unifying code and making it possible to tools (ie:
an edje editor) to work with it.


> So, for the implementation cost, using a library that can be extended as
> needed in the future versus doing the work all over again if later on it's
> desired to go to libxml2 or expat or whatever that is complete... I'd say do
> the right thing from start instead of a hackish way at start that may become
> more expensive in the future.
>
> And I'm the one who moved away from XML to JSON in elmdentica (first with
> cJSON then moved on to Azy), so I'm not an XML freak :)

I know, I know.


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to