Home | History | Annotate | Download | only in example

Lines Matching refs:cur

46 parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
62 cur = cur->xmlChildrenNode;
63 while (cur != NULL) {
64 if ((!xmlStrcmp(cur->name, (const xmlChar *)"Person")) &&
65 (cur->ns == ns))
66 ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
67 if ((!xmlStrcmp(cur->name, (const xmlChar *)"Email")) &&
68 (cur->ns == ns))
69 ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
70 cur = cur->next;
80 printPerson(personPtr cur) {
81 if (cur == NULL) return;
83 if (cur->name) printf(" name: %s\n", cur->name);
84 if (cur->email) printf(" email: %s\n", cur->email);
85 if (cur->company) printf(" company: %s\n", cur->company);
86 if (cur->organisation) printf(" organisation: %s\n", cur->organisation);
87 if (cur->smail) printf(" smail: %s\n", cur->smail);
88 if (cur->webPage) printf(" Web: %s\n", cur->webPage);
89 if (cur->phone) printf(" phone: %s\n", cur->phone);
109 parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
124 cur = cur->xmlChildrenNode;
125 while (cur != NULL) {
127 if ((!xmlStrcmp(cur->name, (const xmlChar *) "Project")) &&
128 (cur->ns == ns)) {
129 ret->projectID = xmlGetProp(cur, (const xmlChar *) "ID");
134 if ((!xmlStrcmp(cur->name, (const xmlChar *) "Application")) &&
135 (cur->ns == ns))
137 xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
138 if ((!xmlStrcmp(cur->name, (const xmlChar *) "Category")) &&
139 (cur->ns == ns))
141 xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
142 if ((!xmlStrcmp(cur->name, (const xmlChar *) "Contact")) &&
143 (cur->ns == ns))
144 ret->contact = parsePerson(doc, ns, cur);
145 cur = cur->next;
155 printJob(jobPtr cur) {
158 if (cur == NULL) return;
160 if (cur->projectID != NULL) printf("projectID: %s\n", cur->projectID);
161 if (cur->application != NULL) printf("application: %s\n", cur->application);
162 if (cur->category != NULL) printf("category: %s\n", cur->category);
163 if (cur->contact != NULL) printPerson(cur->contact);
164 printf("%d developers\n", cur->nbDevelopers);
166 for (i = 0;i < cur->nbDevelopers;i++) printPerson(cur->developers[i]);
185 xmlNodePtr cur;
204 cur = xmlDocGetRootElement(doc);
205 if (cur == NULL) {
210 ns = xmlSearchNsByHref(doc, cur,
218 if (xmlStrcmp(cur->name, (const xmlChar *) "Helping")) {
239 cur = cur->xmlChildrenNode;
240 while ( cur && xmlIsBlankNode ( cur ) ) {
241 cur = cur -> next;
243 if ( cur == 0 ) {
248 if ((xmlStrcmp(cur->name, (const xmlChar *) "Jobs")) || (cur->ns != ns)) {
250 cur->name);
262 cur = cur->xmlChildrenNode;
263 while (cur != NULL) {
264 if ((!xmlStrcmp(cur->name, (const xmlChar *) "Job")) &&
265 (cur->ns == ns)) {
266 curjob = parseJob(doc, ns, cur);
271 cur = cur->next;
278 handleGjob(gJobPtr cur) {
284 printf("%d Jobs registered\n", cur->nbJobs);
285 for (i = 0; i < cur->nbJobs; i++) printJob(cur->jobs[i]);
290 gJobPtr cur;
297 cur = parseGjobFile(argv[i]);
298 if ( cur )
299 handleGjob(cur);