X7ROOT File Manager
Current Path:
/opt/alt/libxml2/usr/share/doc/alt-libxml2-devel/tutorial
opt
/
alt
/
libxml2
/
usr
/
share
/
doc
/
alt-libxml2-devel
/
tutorial
/
ðŸ“
..
📄
apa.html
(2.06 KB)
📄
apb.html
(1.98 KB)
📄
apc.html
(3.02 KB)
📄
apd.html
(3.16 KB)
📄
ape.html
(3.02 KB)
📄
apf.html
(2.88 KB)
📄
apg.html
(2.95 KB)
📄
aph.html
(3.52 KB)
📄
api.html
(1.85 KB)
📄
ar01s02.html
(3.42 KB)
📄
ar01s03.html
(5.58 KB)
📄
ar01s04.html
(6.14 KB)
📄
ar01s05.html
(7.28 KB)
📄
ar01s06.html
(3.79 KB)
📄
ar01s07.html
(3.8 KB)
📄
ar01s08.html
(3.83 KB)
📄
ar01s09.html
(7.42 KB)
ðŸ“
images
📄
includeaddattribute.c
(1.11 KB)
📄
includeaddkeyword.c
(1.29 KB)
📄
includeconvert.c
(1.77 KB)
📄
includegetattribute.c
(1.14 KB)
📄
includekeyword.c
(1.32 KB)
📄
includexpath.c
(1.46 KB)
📄
index.html
(5.83 KB)
📄
ix01.html
(2.49 KB)
Editing: includekeyword.c
<![CDATA[ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <libxml/xmlmemory.h> #include <libxml/parser.h> void parseStory (xmlDocPtr doc, xmlNodePtr cur) { xmlChar *key; cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); printf("keyword: %s\n", key); xmlFree(key); } cur = cur->next; } return; } static void parseDoc(char *docname) { xmlDocPtr doc; xmlNodePtr cur; doc = xmlParseFile(docname); if (doc == NULL ) { fprintf(stderr,"Document not parsed successfully. \n"); return; } cur = xmlDocGetRootElement(doc); if (cur == NULL) { fprintf(stderr,"empty document\n"); xmlFreeDoc(doc); return; } if (xmlStrcmp(cur->name, (const xmlChar *) "story")) { fprintf(stderr,"document of the wrong type, root node != story"); xmlFreeDoc(doc); return; } cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){ parseStory (doc, cur); } cur = cur->next; } xmlFreeDoc(doc); return; } int main(int argc, char **argv) { char *docname; if (argc <= 1) { printf("Usage: %s docname\n", argv[0]); return(0); } docname = argv[1]; parseDoc (docname); return (1); } ]]>
Upload File
Create Folder