Re: xml parse



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





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