Re: Parsing XML in gnome-shell with Javascript - libxml2?

Il giorno dom, 05/06/2011 alle 16.25 +0100, Dru Moore ha scritto:
> Appreciate this may not be exactly the right place for this question,
> however someone here may have solved this already.
> I've been playing around with writing some shell-extensions and have a
> need to parse some proper xml returned from a service endpoint.
> Normally (in an app) I'd use libxml2 and parse the response that way.
> Is libxml2 fully supported? I see there is a .gir file for it but that
> doesn't look complete to me - i.e. I can but I'm
> having difficulty doing anything with it.

No. Libxml2 is not a GObject library, and thus cannot be supported by

> Could someone give me a quick pointer on how to use libxml2 from
> javascript OR suggest a better way of parsing a full xml document -
> would GMarkup be a better choice?

For various reasons, GMarkup is not introspectable at the moment. You
can either wait for libgeexml / libgdom (, it's a GSoC
2011 project), or use EcmaScript4XML (E4X).


Attachment: signature.asc
Description: This is a digitally signed message part

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