~ubuntu-branches/ubuntu/hardy/pcmanfm/hardy-backports

« back to all changes in this revision

Viewing changes to src/ptk-ui-xml/ptk-xml-tree.h

  • Committer: Bazaar Package Importer
  • Author(s): J?r?me Guelfucci
  • Date: 2008-07-01 00:40:37 UTC
  • mfrom: (5.1.3 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080701004037-q6pfacskp0xnk10k
Tags: 0.4.3-1~hardy1
Automated backport upload; no source changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *      ptk-xml-tree.h - Over-simplified mini xml dom implementation
 
3
 *
 
4
 *      Copyright 2008 PCMan <pcman.tw@gmail.com>
 
5
 *
 
6
 *      This program is free software; you can redistribute it and/or modify
 
7
 *      it under the terms of the GNU General Public License as published by
 
8
 *      the Free Software Foundation; either version 2 of the License, or
 
9
 *      (at your option) any later version.
 
10
 *
 
11
 *      This program is distributed in the hope that it will be useful,
 
12
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *      GNU General Public License for more details.
 
15
 *
 
16
 *      You should have received a copy of the GNU General Public License
 
17
 *      along with this program; if not, write to the Free Software
 
18
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
19
 *      MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef _PTK_XML_TREE_H_
 
23
#define _PTK_XML_TREE_H_
 
24
 
 
25
#include <glib.h>
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
typedef struct _XmlNode XmlNode;
 
30
struct _XmlNode
 
31
{
 
32
    char* name;
 
33
    char** props;
 
34
    char** vals;
 
35
    char* cdata;
 
36
    XmlNode* parent;
 
37
    GSList* children;
 
38
};
 
39
 
 
40
XmlNode* xml_tree_load( const char* filename );
 
41
/*
 
42
XmlNode* xml_node_get_from_path( XmlNode* tree, const char* path );
 
43
GSList* xml_node_get_elements_by_name( XmlNode* node, const char* tag_name );
 
44
*/
 
45
 
 
46
void xml_node_free( XmlNode* tree );
 
47
#define xml_tree_free( tree )   xml_node_free( tree )
 
48
const char* xml_node_get_tag_name( XmlNode* node );
 
49
const char* xml_node_get_prop( XmlNode* node, const char* name );
 
50
 
 
51
G_END_DECLS
 
52
 
 
53
#endif