1 /* dia -- an diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #include <libxml/tree.h>
28 DIAVAR
int pretty_formated_xml
;
30 typedef xmlNodePtr XML_NODE
;
32 typedef XML_NODE ObjectNode
;
33 typedef XML_NODE AttributeNode
;
34 typedef XML_NODE DataNode
;
49 AttributeNode
object_find_attribute(ObjectNode obj_node
,
50 const char *attrname
);
51 AttributeNode
composite_find_attribute(DataNode composite_node
,
52 const char *attrname
);
53 int attribute_num_data(AttributeNode attribute
);
54 DataNode
attribute_first_data(AttributeNode attribute
);
55 DataNode
data_next(DataNode data
);
56 DataType
data_type(DataNode data
);
57 int data_int(DataNode data
);
58 int data_enum(DataNode data
);
59 real
data_real(DataNode data
);
60 int data_boolean(DataNode data
);
61 void data_color(DataNode data
, Color
*col
);
62 void data_point(DataNode data
, Point
*point
);
63 void data_rectangle(DataNode data
, Rectangle
*rect
);
64 char *data_string(DataNode data
);
65 DiaFont
*data_font(DataNode data
);
67 AttributeNode
new_attribute(ObjectNode obj_node
, const char *attrname
);
68 AttributeNode
composite_add_attribute(DataNode composite_node
,
69 const char *attrname
);
70 void data_add_int(AttributeNode attr
, int data
);
71 void data_add_enum(AttributeNode attr
, int data
);
72 void data_add_real(AttributeNode attr
, real data
);
73 void data_add_boolean(AttributeNode attr
, int data
);
74 void data_add_color(AttributeNode attr
, const Color
*col
);
75 void data_add_point(AttributeNode attr
, const Point
*point
);
76 void data_add_rectangle(AttributeNode attr
, const Rectangle
*rect
);
77 void data_add_string(AttributeNode attr
, const char *str
);
78 void data_add_font(AttributeNode attr
, const DiaFont
*font
);
79 DataNode
data_add_composite(AttributeNode attr
,
80 const char *type
); /* can be NULL */
82 #endif /* DIA_XML_H */