version 1.43, 2000/02/13 19:56:23
|
version 1.44, 2000/02/14 08:24:33
|
Line 564 attribute(void *ctx, const xmlChar *full
|
Line 564 attribute(void *ctx, const xmlChar *full
|
|
|
if (ret != NULL) { |
if (ret != NULL) { |
if ((ctxt->replaceEntities == 0) && (!ctxt->html)) |
if ((ctxt->replaceEntities == 0) && (!ctxt->html)) |
ret->val = xmlStringGetNodeList(ctxt->myDoc, value); |
ret->children = xmlStringGetNodeList(ctxt->myDoc, value); |
else |
else |
ret->val = xmlNewDocText(ctxt->myDoc, value); |
ret->children = xmlNewDocText(ctxt->myDoc, value); |
} |
} |
|
|
if (ctxt->validate && ctxt->wellFormed && |
if (ctxt->validate && ctxt->wellFormed && |
Line 645 startElement(void *ctx, const xmlChar *f
|
Line 645 startElement(void *ctx, const xmlChar *f
|
*/ |
*/ |
ret = xmlNewDocNode(ctxt->myDoc, NULL, name, NULL); |
ret = xmlNewDocNode(ctxt->myDoc, NULL, name, NULL); |
if (ret == NULL) return; |
if (ret == NULL) return; |
if (ctxt->myDoc->root == NULL) { |
if (ctxt->myDoc->children == NULL) { |
#ifdef DEBUG_SAX_TREE |
#ifdef DEBUG_SAX_TREE |
fprintf(stderr, "Setting %s as root\n", name); |
fprintf(stderr, "Setting %s as root\n", name); |
#endif |
#endif |
ctxt->myDoc->root = ret; |
ctxt->myDoc->children = ret; |
} else if (parent == NULL) { |
} else if (parent == NULL) { |
parent = ctxt->myDoc->root; |
parent = ctxt->myDoc->children; |
} |
} |
|
|
/* |
/* |
Line 889 processingInstruction(void *ctx, const x
|
Line 889 processingInstruction(void *ctx, const x
|
ret = xmlNewPI(target, data); |
ret = xmlNewPI(target, data); |
if (ret == NULL) return; |
if (ret == NULL) return; |
ret->doc = ctxt->myDoc; |
ret->doc = ctxt->myDoc; |
if (ctxt->myDoc->root == NULL) { |
if (ctxt->myDoc->children == NULL) { |
#ifdef DEBUG_SAX_TREE |
#ifdef DEBUG_SAX_TREE |
fprintf(stderr, "Setting PI %s as root\n", target); |
fprintf(stderr, "Setting PI %s as root\n", target); |
#endif |
#endif |
ctxt->myDoc->root = ret; |
ctxt->myDoc->children = ret; |
} else if (parent == NULL) { |
} else if (parent == NULL) { |
parent = ctxt->myDoc->root; |
parent = ctxt->myDoc->children; |
} |
} |
if (parent != NULL) { |
if (parent != NULL) { |
if (parent->type == XML_ELEMENT_NODE) { |
if (parent->type == XML_ELEMENT_NODE) { |
Line 1068 comment(void *ctx, const xmlChar *value)
|
Line 1068 comment(void *ctx, const xmlChar *value)
|
ret = xmlNewDocComment(ctxt->myDoc, value); |
ret = xmlNewDocComment(ctxt->myDoc, value); |
if (ret == NULL) return; |
if (ret == NULL) return; |
|
|
if (ctxt->myDoc->root == NULL) { |
if (ctxt->myDoc->children == NULL) { |
#ifdef DEBUG_SAX_TREE |
#ifdef DEBUG_SAX_TREE |
fprintf(stderr, "Setting comment as root\n"); |
fprintf(stderr, "Setting comment as root\n"); |
#endif |
#endif |
ctxt->myDoc->root = ret; |
ctxt->myDoc->children = ret; |
} else if (parent == NULL) { |
} else if (parent == NULL) { |
parent = ctxt->myDoc->root; |
parent = ctxt->myDoc->children; |
} |
} |
if (parent != NULL) { |
if (parent != NULL) { |
if (parent->type == XML_ELEMENT_NODE) { |
if (parent->type == XML_ELEMENT_NODE) { |