From: <enl...@li...> - 2004-09-24 12:52:35
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml Log Message: Directory /cvsroot/enlightenment/e17/proto/exml added to the repository |
From: <enl...@li...> - 2004-09-24 12:54:12
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Log Message: Directory /cvsroot/enlightenment/e17/proto/exml/src added to the repository |
From: <enl...@li...> - 2004-09-24 12:55:35
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml Added Files: AUTHORS COPYING ChangeLog INSTALL Makefile.am NEWS README autogen.sh configure.in depcomp Log Message: Initial commit of e17 xml reader/writer. |
From: <enl...@li...> - 2004-09-24 12:55:36
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Added Files: EXML.h Makefile.am exml.c Log Message: Initial commit of e17 xml reader/writer. |
From: <enl...@li...> - 2004-09-24 16:08:03
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml Modified Files: Makefile.am configure.in Added Files: exml-config.in exml.pc.in Log Message: Added exml-config and exml.pc, added some traversal api calls. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exml/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Makefile.am 24 Sep 2004 12:55:26 -0000 1.1 +++ Makefile.am 24 Sep 2004 16:07:53 -0000 1.2 @@ -3,13 +3,18 @@ SUBDIRS = src EXTRA_DIST = \ - README AUTHORS COPYING + README AUTHORS COPYING exml.pc.in MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ config.h.in config.sub configure install-sh \ ltconfig ltmain.sh missing mkinstalldirs \ stamp-h.in +bin_SCRIPTS = exml-config + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = exml.pc + dist-hook: if test -d data; then \ (cd $(srcdir); tar -cf - data) | (cd $(distdir); tar -xf -; rm -rf `find . -name CVS`) \ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exml/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- configure.in 24 Sep 2004 12:55:26 -0000 1.1 +++ configure.in 24 Sep 2004 16:07:54 -0000 1.2 @@ -86,6 +86,11 @@ AC_OUTPUT([ Makefile +exml.pc +exml-config src/Makefile -]) +], [ +chmod +x exml-config +] +) |
From: <enl...@li...> - 2004-09-24 16:08:31
|
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 |
From: <enl...@li...> - 2004-09-25 21:16:50
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Modified Files: EXML.h exml.c Log Message: Typo in CHECK_PARAM call. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exml/src/EXML.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- EXML.h 24 Sep 2004 16:07:55 -0000 1.2 +++ EXML.h 25 Sep 2004 21:16:40 -0000 1.3 @@ -57,6 +57,7 @@ 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_next_nomove(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.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- exml.c 24 Sep 2004 16:07:55 -0000 1.2 +++ exml.c 25 Sep 2004 21:16:40 -0000 1.3 @@ -336,6 +336,40 @@ } /** + * Move the current xml to its next sibling, return NULL and move to parent + * at the end of the list + * @param xml The xml document + * @return The current xml tag name or NULL + * @ingroup EXML_Traversal_Group + */ +char *exml_next_nomove(EXML *xml) +{ + Ecore_List *p_list; + EXML_Node *parent, *cur; + + CHECK_PARAM_POINTER_RETURN("xml", xml, NULL); + + if( xml->current ) { + cur = xml->current; + parent = cur->parent; + + if( parent ) { + p_list = parent->children; + + ecore_list_goto( p_list, xml->current ); + ecore_list_next( p_list ); + if( (xml->current = ecore_list_current( p_list )) == NULL ) { + xml->current = cur; + return NULL; + } + } else + xml->current = NULL; + } + + return xml->current ? xml->current->tag : NULL; +} + +/** * Move the current xml to its first child if there are children * @param xml The xml document * @return The current xml tag name |
From: <enl...@li...> - 2004-09-25 22:00:36
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Modified Files: exml.c Log Message: exml_down was not returning NULL on no children for current node. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exml/src/exml.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- exml.c 25 Sep 2004 21:16:40 -0000 1.3 +++ exml.c 25 Sep 2004 22:00:26 -0000 1.4 @@ -381,6 +381,8 @@ if( exml_has_children(xml) ) xml->current = ecore_list_goto_first( xml->current->children ); + else + return NULL; return xml->current ? xml->current->tag : NULL; } |
From: <enl...@li...> - 2005-01-04 23:37:29
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Modified Files: exml.c Log Message: Updated to reflect api changes in ecore_data. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exml/src/exml.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- exml.c 25 Sep 2004 22:00:26 -0000 1.4 +++ exml.c 4 Jan 2005 23:37:09 -0000 1.5 @@ -644,28 +644,18 @@ xmlBufferFree( buf ); } -/* temp val for callback */ -static xmlTextWriter *t_writer; - -static void _exml_write_attribute( void *val ) -{ - Ecore_Hash_Node *node; - - node = val; - - xmlTextWriterWriteAttribute( t_writer, node->key, node->value ); -} - static void _exml_write_element(EXML_Node *node, xmlTextWriter *writer) { EXML_Node *child; + Ecore_Hash_Node *hash_node; xmlTextWriterStartElement( writer, node->tag ); - t_writer = writer; - ecore_hash_for_each_node( node->attributes, _exml_write_attribute ); - t_writer = NULL; + ecore_hash_goto_first( node->attributes ); + + while( (hash_node = ecore_hash_next( node->attributes )) ) + xmlTextWriterWriteAttribute( writer, hash_node->key, hash_node->value ); if( node->value ) xmlTextWriterWriteString( writer, node->value ); |
From: <enl...@li...> - 2005-07-08 02:58:16
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Modified Files: exml.c Log Message: Updated to include calls to ecore_hash_keys. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exml/src/exml.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- exml.c 4 Jan 2005 23:37:09 -0000 1.5 +++ exml.c 8 Jul 2005 02:58:09 -0000 1.6 @@ -645,17 +645,22 @@ } static void _exml_write_element(EXML_Node *node, - xmlTextWriter *writer) + xmlTextWriter *writer) { EXML_Node *child; - Ecore_Hash_Node *hash_node; + Ecore_List *keys; + char *name; xmlTextWriterStartElement( writer, node->tag ); - ecore_hash_goto_first( node->attributes ); + keys = ecore_hash_keys( node->attributes ); + ecore_list_goto_first( keys ); - while( (hash_node = ecore_hash_next( node->attributes )) ) - xmlTextWriterWriteAttribute( writer, hash_node->key, hash_node->value ); + while( (name = ecore_list_next( keys )) ) + xmlTextWriterWriteAttribute( writer, name, + ecore_hash_get( node->attributes, name ) ); + + ecore_list_destroy( keys ); if( node->value ) xmlTextWriterWriteString( writer, node->value ); |
From: <enl...@li...> - 2005-07-08 03:40:57
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml/src Removed Files: EXML.h Makefile.am exml.c Log Message: Hooray for moving day. |
From: <enl...@li...> - 2005-07-08 03:40:57
|
Enlightenment CVS committal Author : werkt Project : e17 Module : proto Dir : e17/proto/exml Removed Files: AUTHORS COPYING ChangeLog INSTALL Makefile.am NEWS README autogen.sh configure.in depcomp exml-config.in exml.pc.in Log Message: Hooray for moving day. |