Skip to content

GNOME/gxml

Repository files navigation

GXml provides a GObject API for manipulating XML and a Serializable
framework from GObject to XML.

GXml provide a DOM level 4 API and CSS Selectors Level 3 for XML with multiple backends.

* A backend wrapping around libxml2 for read/write, the GNode class series
* A GObject based tree backend, a more closed DOM4 implementation support is present,
  the GomNode class series.

GXml also provides a powerful XML to/from GObject automatic serialization. It uses
GObject and "The Power of Nick"(C). Consider visit the Wiki documentation in order to
find how this is archived and how you can map XML to GObject properties using Vala's
simple syntax. Visit: https://gitlab.gnome.org/GNOME/gxml/-/wikis/element

Compile:
  Requirements:
   * vala
   * libgee
   * libxml2

  Optional Requirements:
    * valadoc: we generate documentation using valadoc.  If it's not
      packaged for your distro (like Fedora) follow the instructions
      at:

      https://live.gnome.org/Valadoc


  Meson build system:

  $ meson _build
  $ cd _build
  $ ninja
  $ ninja install
  
  NOTE : GXml can be used as meson subproject for others projects
    * create a file named 'gxml.wrap' (or another name, but keep .wrap extension) with this content:
        [wrap-git]
        directory=gxml
        url=https://gitlab.gnome.org/GNOME/gxml.git
        revision=master
    * put .wrap file inside 'subprojects' folder (folder at the root of project)
    * in your meson.build file, call this subproject like this:
        subproject('gxml').get_variable('any_variable_inside_build_files') (replace 'gxml' with the name of your .wrap file)
        subproject('gxml').get_variable('libgxml_build_dir')
      or, as dependency:
        gxml = dependency('gxml-0.22', fallback : [ 'gxml', 'any_variable_inside_build_files' ]) (replace 'gxml' with the name of your .wrap file)
        gxml = dependency('gxml-0.22', fallback : [ 'gxml', 'libgxml_dep' ]) (replace 'gxml' with the name of your .wrap file)


Test: You can run the test suite, which is gxml_test, which you may
  have installed into your $PATH.

  Meson build system:

  $ meson test



Writing documentation

  We use Valadoc, http://www.valadoc.org/, which is probably the best
  solution to generate both valadoc documentation and HTML gtk-doc
  documentation.

  Installation for DevHelp:

  Make sure you have valadoc installed, documentation is automatically
  generated, then install it, your documentation will be available in
  DevHelp.

  Some notes:

  - Documentation for overriding functions/methods is shown in
    valadoc, but not in gtkdoc.  For gtkdoc, you can only go up to the
    original superclass to see what's been available, even if it's
    been overridden.  (Would we want this to be any different for
    gtkdoc?)

  - Multi-line descriptions will only have the first line appear in
    valadoc.

  - Valadoc's documentation use JavaScript to navigate over inherited
    methods and properties, but DevHelp have no support for that.
    TODO: write a patch to DevHelp to support Valadoc's JavaScript

Packages

 
 
 

Contributors