MCPcopy Create free account
hub / github.com/apache/cloudberry / parseS3Tag

Method parseS3Tag

gpcontrib/gpcloud/src/s3restful_service.cpp:364–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364string S3MessageParser::parseS3Tag(const string &tag) {
365 string contentStr("Unknown value");
366
367 xmlNode *rootElement = xmlDocGetRootElement(xmlptr->myDoc);
368 if (rootElement == NULL) {
369 S3ERROR("Failed to parse returned xml of bucket list");
370 return contentStr;
371 }
372
373 xmlNodePtr curNode = rootElement->xmlChildrenNode;
374 while (curNode != NULL) {
375 if (xmlStrcmp(curNode->name, (const xmlChar *)tag.c_str()) == 0) {
376 char *content = (char *)xmlNodeGetContent(curNode);
377 if (content != NULL) {
378 contentStr = content;
379 xmlFree(content);
380 }
381 return contentStr;
382 }
383
384 curNode = curNode->next;
385 }
386 return contentStr;
387}

Callers 1

getUploadIdMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected