Enlightenment CVS committal
Author : werkt
Project : e17
Module : proto
Dir : e17/proto/exml/src
Modified Files:
EXML.h exml.c
Log Message:
Added exml-config and exml.pc, added some traversal api calls.
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/exml/src/EXML.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- EXML.h 24 Sep 2004 12:55:26 -0000 1.1
+++ EXML.h 24 Sep 2004 16:07:55 -0000 1.2
@@ -41,6 +41,7 @@
/* Removing tags from the document (recursive) */
inline int exml_tag_remove(EXML *xml);
+void exml_destroy(EXML *xml);
/* Retrieve the current tag information */
inline EXML_Node *exml_get(EXML *xml);
@@ -54,6 +55,7 @@
* the hierarchy (down returns NULL if there are no children)
*/
inline char *exml_goto_top(EXML *xml);
+inline char *exml_goto(EXML *xml, char *tag, char *value);
inline char *exml_next(EXML *xml);
inline char *exml_down(EXML *xml);
inline char *exml_up(EXML *xml);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/exml/src/exml.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- exml.c 24 Sep 2004 12:55:26 -0000 1.1
+++ exml.c 24 Sep 2004 16:07:55 -0000 1.2
@@ -277,6 +277,32 @@
}
/**
+ * Move the current xml document pointer to the tag indicated by @c tag
+ * and @c value
+ * @param xml The xml document
+ * @param tag The xml tag to look for
+ * @param value The xml value to look for
+ * @return The current xml tag name
+ * @ingroup EXML_Traversal_Group
+ */
+char *exml_goto(EXML *xml, char *tag, char *value)
+{
+ CHECK_PARAM_POINTER_RETURN("xml", xml, NULL);
+
+ exml_goto_top(xml);
+
+ while( exml_get( xml ) ) {
+ if( !strcmp( tag, exml_tag_get( xml ) ) &&
+ !strcmp( value, exml_value_get( xml ) ) ) {
+ return exml_tag_get( xml );
+ }
+ exml_next(xml);
+ }
+
+ return NULL;
+}
+
+/**
* Move the current xml to its next sibling, return NULL and move to the parent
* when there are no more children
* @param xml The xml document
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs