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

Function xmlSAX2AppendChild

ThirdParty/libxml2/vtklibxml2/SAX2.c:888–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

886}
887
888static void
889xmlSAX2AppendChild(xmlParserCtxtPtr ctxt, xmlNodePtr node) {
890 xmlNodePtr parent;
891 xmlNodePtr last;
892
893 if (ctxt->inSubset == 1) {
894 parent = (xmlNodePtr) ctxt->myDoc->intSubset;
895 } else if (ctxt->inSubset == 2) {
896 parent = (xmlNodePtr) ctxt->myDoc->extSubset;
897 } else {
898 parent = ctxt->node;
899 if (parent == NULL)
900 parent = (xmlNodePtr) ctxt->myDoc;
901 }
902
903 last = parent->last;
904 if (last == NULL) {
905 parent->children = node;
906 } else {
907 last->next = node;
908 node->prev = last;
909 }
910
911 parent->last = node;
912 node->parent = parent;
913
914 if ((node->type != XML_TEXT_NODE) &&
915 (ctxt->linenumbers) &&
916 (ctxt->input != NULL)) {
917 if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
918 node->line = ctxt->input->line;
919 else
920 node->line = USHRT_MAX;
921 }
922}
923
924#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
925/**

Callers 6

xmlSAX2StartElementFunction · 0.85
xmlSAX2StartElementNsFunction · 0.85
xmlSAX2ReferenceFunction · 0.85
xmlSAX2TextFunction · 0.85
xmlSAX2CommentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected