| 433 | // ================================================================================================= |
| 434 | |
| 435 | static 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 |
nothing calls this directly
no test coverage detected