doc/tutorial/xmltutorial.xml doc/tutorial/includekeyword.c
Sun Dec 15 21:27:30 MST 2002 John Fleck <jfleck@inkstain.net>
* doc/tutorial/xmltutorial.xml
* doc/tutorial/includekeyword.c
* doc/tutorial/includegetattribute.c
plus generated html and pdf
Adding fix from Niraj Tolia to tutorial to properly free memory.
diff --git a/doc/tutorial/ape.html b/doc/tutorial/ape.html
index f473044..9dc363c 100644
--- a/doc/tutorial/ape.html
+++ b/doc/tutorial/ape.html
@@ -10,14 +10,17 @@
void
getReference (xmlDocPtr doc, xmlNodePtr cur) {
+ xmlChar *uri;
cur = cur->xmlChildrenNode;
while (cur != NULL) {
if ((!xmlStrcmp(cur->name, (const xmlChar *)"reference"))) {
- printf("uri: %s\n", xmlGetProp(cur, "uri"));
- }
+ uri = xmlGetProp(cur, "uri");
+ printf("uri: %s\n", uri);
+ xmlFree(uri);
+ }
cur = cur->next;
}
- return;
+ return;
}