Re: xml parse
- From: Osmo Antero <osmoma gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: xml parse
- Date: Mon, 28 May 2012 20:47:22 +0100
Hello,
I have also used libxml2 with success.
Take a look at this examle.
http://www.futuredesktop.org/tmp/xml-loader.tar.gz
The xml-parser is baked into a gobject (in xml-loader.[ch]), so it's
very easy to use,
Install libxml2-dev-dev package. It contains header files and
libraries for development,
sudo apt-get install libxml2-dev
// Osmo Antero
On Sun, May 27, 2012 at 12:19 PM, Rudra Banerjee <bnrj rudra yahoo com> wrote:
Thanks Emmanuel and xiaohu
I am new to GTK and C programming. Hence don't know things.
Both of your reply helped me to find things out.
Google said libxml2 is the standard way, where markup is "not so
standard" to parse xml. I think I will stick to libxml2.
On Sun, 2012-05-27 at 11:39 +0530, Rudra Banerjee wrote:
Friends,
I have an xml file.
I want to search its Author and Year from GTK entry.
The xml file looks like this:
<xml>
<records>
<record>
<database name="My Collection.enl" path="My Collection.enl">My
Collection.enl</database>
<ref-type name="Journal Article">0</ref-type>
<contributors>
<authors>
<author>Banerjee, Mitali</author>
<author>Banerjee, Rudra</author>
<author>Majumdar, a.K.</author>
<author>Mookerjee, Abhijit</author>
<author>Sanyal, Biplab</author>
<author>Nigam, a.K.</author>
</authors>
</contributors>
<titles>
<title>
Magnetism in NiFeMo disordered alloys: Experiment and theory
</title>
<secondary-title>Physica B: Condensed Matter</secondary-title>
</titles>
<periodical>
<full-title>Physica B: Condensed Matter</full-title>
</periodical>
<pages>4287-4293</pages>
<volume>405</volume>
<issue>20</issue>
<keywords>
<keyword>Magnetic phases</keyword>
<keyword>Spin glasses</keyword>
</keywords>
<dates>
<year>2010</year>
</dates>
<publisher>Elsevier</publisher>
<electronic-resource-num>10.1016/j.physb.2010.07.028</electronic-resource-num>
<urls>
<pdf-urls>
<url>
internal-pdf://Banerjee et al. - 2010 - Magnetism in NiFeMo disordered
alloys Experiment and theory.pdf
</url>
</pdf-urls>
<web-urls>
<url>
http://linkinghub.elsevier.com/retrieve/pii/S0921452610007271
</url>
</web-urls>
</urls>
</record>
....
....
</records>
</xml>
Is there any xml parser that I can use with GTK2+? google says xml
parsing can be done with php. What about C?
Please help.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
// moma
http://www.futuredesktop.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]