MCPcopy Create free account
hub / github.com/Kitware/VTK / htmlAutoCloseTag

Function htmlAutoCloseTag

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:1505–1518  ·  view source on GitHub ↗

* htmlAutoCloseTag: * @doc: the HTML document * @name: The tag name * @elem: the HTML element * * The HTML DTD allows a tag to implicitly close other tags. * The list is kept in htmlStartClose array. This function checks * if the element or one of it's children would autoclose the * given tag. * * Returns 1 if autoclose, 0 otherwise */

Source from the content-addressed store, hash-verified

1503 * Returns 1 if autoclose, 0 otherwise
1504 */
1505int
1506htmlAutoCloseTag(htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem) {
1507 htmlNodePtr child;
1508
1509 if (elem == NULL) return(1);
1510 if (xmlStrEqual(name, elem->name)) return(0);
1511 if (htmlCheckAutoClose(elem->name, name)) return(1);
1512 child = elem->children;
1513 while (child != NULL) {
1514 if (htmlAutoCloseTag(doc, name, child)) return(1);
1515 child = child->next;
1516 }
1517 return(0);
1518}
1519
1520/**
1521 * htmlIsAutoClosed:

Callers 1

htmlIsAutoClosedFunction · 0.85

Calls 2

xmlStrEqualFunction · 0.85
htmlCheckAutoCloseFunction · 0.85

Tested by

no test coverage detected