1
0
Fork 0

Erik HOFMAN: add documentation/changelog

This commit is contained in:
mfranz 2008-06-29 13:33:26 +00:00
parent 24071a3133
commit 64a07de080
2 changed files with 77 additions and 0 deletions

15
utils/xmlgrep/ChangeLog Normal file
View file

@ -0,0 +1,15 @@
29-06-2008:
* rename xmlGet(Int/Double/String) to xmlGetNode(Int/Double/String)
* add new xmlGet(Int/Double/String) functions
* rename xmlCompareString to xmlCompareNodeString for consistency
* rename xmlCompareElement to xmlCompareString for consistency
* add a README file with short examples of various functions
27-06-2008:
* removed some memorly allocation in xmlGetNode and XMLGetNextElement
* use the filesize for mmap and remove the root node from the xml-id
* rearange xmlGetNode to work with complicated xml files
* add the xmlMarkId function to save the id before using xmlGetNextElement
* speed up xmlGetNextId
23-06-2008: Initial release

62
utils/xmlgrep/README Normal file
View file

@ -0,0 +1,62 @@
#
# Functions to Open and Close the XML file
# e.g.
# id = xmlOpen("/tmp/file.xml");
# xmlClose(id);
#
void *xmlOpen(const char *);
void xmlClose(const void *);
#
# Get the Id of a node at the specified path
# e.g.
# xnid = xmlGetNode(id, "/path/to/specified/node");
#
void *xmlGetNode(const void *, const char *);
void *xmlCopyNode(void *, const char *);
#
# Functions to walk the node tree an process them one by one.
# e.g.
# xmid = xmlMarkId(id);
# num = xmlGetNumElements(xmid);
# for (i=0; i<num; i++) {
# if (xmlGetNextElement(id, xmid, "element") != 0) {
# if ((s = xmlGetString(xmid)) != 0) {
# printf("%s\n", s);
# free(s);
# }
# }
# }
#
void *xmlMarkId(void *);
unsigned int xmlGetNumElements(void *, const char *);
void *xmlGetNextElement(const void *, void *, const char *);
#
# These functions work on the current node.
# e.g.
# xnid = xmlGetNode(id, "/path/to/last/node");
# i = xmlGetInt(xnid);
# or
# xnid = xmlGetNode(id, "/path/to/specified/node");
# if (xmlCompareString(xnid, "value") == 0) printf("We have a match!\n");
#
long int xmlGetInt(void *);
double xmlGetDouble(void *);
char *xmlGetString(void *);
int xmlCompareString(const void *, const char *);
#
# These functions work on a specified node path
# e.g.
# d = xmlGetNodeDouble(id, "/path/to/node");
# or
# xnid = xmlGetNode(id, "/path/to");
# i = xmlGetNodeInt(xnid, "node");
#
long int xmlGetNodeInt(void *, const char *);
double xmlGetNodeDouble(void *, const char *);
char *xmlGetNodeString(void *, const char *);
unsigned xmlCopyNodeString(void *, const char *, char *, const unsigned int);
int xmlCompareNodeString(const void *, const char *, const char *);