aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-xml-utils.c-56826
blob: e6f361392ba0c06cf501015aa3107aa86da8f3e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* 
 * e-xml-utils.c
 * Copyright (C) 2000  Helix Code, Inc.
 * Author: Chris Lahey <clahey@helixcode.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#include "e-xml-utils.h"
#include <gnome-xml/parser.h>

xmlNode *e_xml_get_child_by_name(xmlNode *parent, xmlChar *child_name)
{
    xmlNode *child;
    
    for (child = parent->childs; child; child = child->next) {
        if ( !xmlStrcmp( child->name, child_name ) ) {
            return child;
        }
    }
    return NULL;
}

int
e_xml_get_integer_prop_by_name(xmlNode *parent, xmlChar *prop_name)
{
    xmlChar *prop = xmlGetProp(parent, prop_name);
    if (prop)
        return atoi(prop);
    else
        return 0;
}
ni-1.3.8&id=f2c4f5c0e9f3fef236022e4b22cde8dfbe695df6'>qudos
Commit message (Expand)AuthorAgeFilesLines
* - Forgot a !WITHOUT_GAME -> WITH_GAME.alepulver2007-01-061-1/+1
* - Only define USE_GL when needed.alepulver2007-01-061-6/+2
* - Fix the game keeping running in a loop before exiting (not doing it at all).alepulver2006-12-301-0/+20
* - Avoid creating a "baseq2" subdirectory in the current directory.alepulver2006-12-302-7/+25
* - Update devel/sdl12 to version 1.2.11. Now we employ stock SDL directorystas2006-09-201-1/+1
* - Bump PORTREVISION.alepulver2006-07-302-0/+36
* - Make fetchable (author renamed QuDos.pk3 to match with program version).alepulver2006-07-03td>1-0/+2
* Update to 0.0.10ahze2008-01-093-5/+20
* Update to 2.3lioux2007-12-212-4/+4
* - Unbreakmiwi2007-12-171-3/+8
* Update to 2.2lioux2007-12-162-4/+4
* Tenr Fluxbox themes packmiwi2007-12-155-0/+7312
* - Mark for removal in one monthpav2007-12-141-0/+3
* Update to 20071213ehaupt2007-12-134-155/+327
* Take over maintainership of all kde-icons-* ports unless otherwiselioux2007-12-131-1/+1
* Update to 2.20.2.mezz2007-12-122-6/+5
* o New port kde-icons-nuoveXT2 version 2.2: KDE nuoveXT 2 iconsetlioux2007-12-125-0/+34
* o New port kde-icons-nuoveXT version 1.6: KDE nuoveXT iconsetlioux2007-12-125-0/+34
* o New port kde-icons-os-k version 1.15: KDE OS-K iconsetlioux2007-12-125-0/+53
* o New port kde-icons-vista-inspirate version 1.0: KDE Vista Inspiratelioux2007-12-125-0/+36
* o New port kde-icons-exquisite version 0.2004081000: KDE Exquisite iconsetlioux2007-12-125-0/+48
* o New port kde-icons-dark-glass version 2.1: KDE Dark Glass iconsetlioux2007-12-125-0/+33
* o New port kde-icons-crystal-project version 0.2007052000: KDElioux2007-12-125-0/+41
* o New port kde-icons-black-and-white version 2.0.a: KDE Black Andlioux2007-12-125-0/+33
* o Fix: make fetchable againlioux2007-12-122-9/+6
* Fix fetchinglioux2007-12-122-6/+4
* Removed port x11-themes/kde-icons-gorilla_svg: Unfetchablelioux2007-12-1213-122/+0
* - s/GNUStep.sh/GNUstep.sh/ on install-user: and deinstall-user:garga2007-11-141-2/+2
* - Fix build with gcc 4.2miwi2007-11-142-7/+76
* Chase the icon-naming-utils update.marcus2007-10-308-29/+242