version 1.9, 1999/08/29 18:01:17
|
version 1.10, 1999/09/01 00:20:45
|
Line 1119 htmlNewDoc(const CHAR *URI, const CHAR *
|
Line 1119 htmlNewDoc(const CHAR *URI, const CHAR *
|
fprintf(stderr, "xmlNewDoc : malloc failed\n"); |
fprintf(stderr, "xmlNewDoc : malloc failed\n"); |
return(NULL); |
return(NULL); |
} |
} |
|
memset(cur, 0, sizeof(xmlDoc)); |
|
|
cur->type = XML_DOCUMENT_NODE; |
cur->type = XML_DOCUMENT_NODE; |
cur->version = NULL; |
cur->version = NULL; |
Line 2219 void
|
Line 2220 void
|
htmlParseElement(htmlParserCtxtPtr ctxt) { |
htmlParseElement(htmlParserCtxtPtr ctxt) { |
const CHAR *openTag = CUR_PTR; |
const CHAR *openTag = CUR_PTR; |
CHAR *name; |
CHAR *name; |
htmlParserNodeInfo node_info; |
|
htmlNodePtr currentNode; |
htmlNodePtr currentNode; |
htmlElemDescPtr info; |
htmlElemDescPtr info; |
|
htmlParserNodeInfo node_info; |
|
|
/* Capture start position */ |
/* Capture start position */ |
node_info.begin_pos = CUR_PTR - ctxt->input->base; |
if (ctxt->record_info) { |
node_info.begin_line = ctxt->input->line; |
node_info.begin_pos = ctxt->input->consumed + |
|
(CUR_PTR - ctxt->input->base); |
|
node_info.begin_line = ctxt->input->line; |
|
} |
|
|
name = htmlParseStartTag(ctxt); |
name = htmlParseStartTag(ctxt); |
if (name == NULL) { |
if (name == NULL) { |
return; |
return; |
} |
} |
|
currentNode = ctxt->node; |
|
|
/* |
/* |
* Lookup the info for that element. |
* Lookup the info for that element. |
Line 2273 htmlParseElement(htmlParserCtxtPtr ctxt)
|
Line 2278 htmlParseElement(htmlParserCtxtPtr ctxt)
|
*/ |
*/ |
nodePop(ctxt); |
nodePop(ctxt); |
free(name); |
free(name); |
|
|
|
/* |
|
* Capture end position and add node |
|
*/ |
|
if ( currentNode != NULL && ctxt->record_info ) { |
|
node_info.end_pos = ctxt->input->consumed + |
|
(CUR_PTR - ctxt->input->base); |
|
node_info.end_line = ctxt->input->line; |
|
node_info.node = currentNode; |
|
xmlParserAddNodeInfo(ctxt, &node_info); |
|
} |
return; |
return; |
} |
} |
|
|
Line 2316 htmlParseElement(htmlParserCtxtPtr ctxt)
|
Line 2332 htmlParseElement(htmlParserCtxtPtr ctxt)
|
} |
} |
|
|
free(name); |
free(name); |
|
|
|
/* |
|
* Capture end position and add node |
|
*/ |
|
if ( currentNode != NULL && ctxt->record_info ) { |
|
node_info.end_pos = ctxt->input->consumed + |
|
(CUR_PTR - ctxt->input->base); |
|
node_info.end_line = ctxt->input->line; |
|
node_info.node = currentNode; |
|
xmlParserAddNodeInfo(ctxt, &node_info); |
|
} |
} |
} |
|
|
/** |
/** |