MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / ProcessingInstructionHandler

Function ProcessingInstructionHandler

xmpsdk/src/ExpatAdapter.cpp:435–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433// =================================================================================================
434
435static void ProcessingInstructionHandler ( void * userData, XMP_StringPtr target, XMP_StringPtr data )
436{
437 XMP_Assert ( target != 0 );
438 ExpatAdapter * thiz = (ExpatAdapter*)userData;
439
440 if ( ! XMP_LitMatch ( target, "xpacket" ) ) return; // Ignore all PIs except the XMP packet wrapper.
441 if ( data == 0 ) data = "";
442
443 #if XMP_DebugBuild & DumpXMLParseEvents
444 if ( thiz->parseLog != 0 ) {
445 PrintIndent ( thiz->parseLog, thiz->elemNesting );
446 fprintf ( thiz->parseLog, "PI: %s - \"%s\"\n", target, data );
447 }
448 #endif
449
450 XML_Node * parentNode = thiz->parseStack.back();
451 XML_Node * piNode = new XML_Node ( parentNode, target, kPINode );
452
453 piNode->value.assign ( data );
454 parentNode->content.push_back ( piNode );
455
456} // ProcessingInstructionHandler
457
458// =================================================================================================
459

Callers

nothing calls this directly

Calls 1

PrintIndentFunction · 0.85

Tested by

no test coverage detected