GXml 0.12 is here!

GXml is a Vala library providing a C and Vala API, along side Python, JavaScript and other languages bindings supported by GObject Introspection, for XML like files for read and write, like HTML, and a framework for GObject serialization to XML. It uses libxml2 as XML engine, wrapped using classes called GNode/GDocument series, and as a reader/writer of a pure GObject implementation of XML trees called TNode/TDocument.

Each implementation have its advantages, GNode have less memory usage but suffer on speed, while TNode require much more memory but is really fast. All measurements were done using Serialization/De-serialization tests for large XML files.

GXml 0.12 provides DOM4 specification implementation as main feature. This allows to deprecated the old DOM1 one. DOM4 requires API changes, but almost all Vala should compile with little modifications.

DOM4 implementation is still incomplete, but allows to you access any XML like trees, like HTML, using a GObject API.

DOM4 was possible thanks to GObject+Vala, because most of its interfaces was really easy to port using Vala syntax and GInterface. GNode/GDocument is the only classes implementing DOM4 interfaces, but other will come.

With these lasts changes, GXml API is becoming more and more stable, suitable to try new use cases.

Some one talk about to support XPath, me about to support XSD and large XML files. May you want to leave comments on what should be the next step on GXml development. Search at G+ Vala channel for a poll.

Author: despinosa

Linux and GNOME user, full time, since 2001. Actual maintainer of GXml and contributor to other projects mainly on GObject Introspection support.

6 thoughts on “GXml 0.12 is here!”

    1. I think moving it to Glib (and implying rewriting it in C rather than Vala) would be huge. I already have two DOM implementations in my projects (colord and appstream-glib) and would love to dump both given half a chance. Being honest; I’m not going to be depending on a vala library any time soon as I have to maintain all my stuff for the next decade and Vala isn’t an ideal long-term support option at all.

      1. Rewrite GXml into C could be not necesary huge when thinking about structure and interfaces. But autogenerated C code from Vala, because it uses lot of temporally variables you can avoid, but read it, is hard.

        Moving to GLib seems to be a good idea. May require to improve its XML parser to provide more tags detection.

        By the way, why do you think Vala is not a long term support option. Should we stop using Vala? But may we can discuss this in my new post about this issue, please hold your comments on this.

    2. From poll on G+:

      I found libxml2 API hard to use. I love API provided by GObject based libraries since GDA, and now I in love with Vala syntax and its, more easy to see than in C, object oriented programming. Vala makes me more productive.

      Vala+ GObject Introspection, from C too, is a explosive combination, allowing to have any library bindings automatically to high level languages like Python and JavaScript.

      In my case I use GXml, in two commercial software, one for electronic invoices using XML and a Electrical Station configuration files, also in XML; both have XSD definitions files, I use to create its GObject representation using Vala and GXml’s Serialization framework.

      See them at:

      http://www.pwmc.mx

  1. whoah this blog is fantastic i really like studying your articles. Keep up the good paintings! You understand, many individuals are looking around for this info, you could aid them greatly. bafkkgdageedbegf

Leave a Reply

Your email address will not be published. Required fields are marked *