* xmlSAX2ProcessingInstruction: * @ctx: the user data (XML parser context) * @target: the target name * @data: the PI data's * * A processing instruction has been parsed. */
| 2554 | * A processing instruction has been parsed. |
| 2555 | */ |
| 2556 | void |
| 2557 | xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target, |
| 2558 | const xmlChar *data) |
| 2559 | { |
| 2560 | xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; |
| 2561 | xmlNodePtr ret; |
| 2562 | |
| 2563 | if (ctx == NULL) return; |
| 2564 | |
| 2565 | ret = xmlNewDocPI(ctxt->myDoc, target, data); |
| 2566 | if (ret == NULL) { |
| 2567 | xmlSAX2ErrMemory(ctxt); |
| 2568 | return; |
| 2569 | } |
| 2570 | |
| 2571 | xmlSAX2AppendChild(ctxt, ret); |
| 2572 | } |
| 2573 | |
| 2574 | /** |
| 2575 | * xmlSAX2Comment: |