diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2005-08-25 13:19:21 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2005-08-25 13:19:21 +0000 |
commit | 8874b94cd2e2086f4cefe026286e0f64cac6ec9a (patch) | |
tree | 640c7e31f9cd75634487bb9074cc74516209aab9 /debugXML.c | |
parent | 3854c57a99852edc952cd69d4e7330b39031035c (diff) | |
download | libxml2-8874b94cd2e2086f4cefe026286e0f64cac6ec9a.tar.gz |
added a parser XML_PARSE_COMPACT option to allocate small text nodes (less
* HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c
xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h:
added a parser XML_PARSE_COMPACT option to allocate small
text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits)
directly within the node, various changes to cope with this.
* result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this
slightly change the output
Daniel
Diffstat (limited to 'debugXML.c')
-rw-r--r-- | debugXML.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -902,9 +902,15 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node) if (!ctxt->check) { xmlCtxtDumpSpaces(ctxt); if (node->name == (const xmlChar *) xmlStringTextNoenc) - fprintf(ctxt->output, "TEXT no enc\n"); + fprintf(ctxt->output, "TEXT no enc"); else - fprintf(ctxt->output, "TEXT\n"); + fprintf(ctxt->output, "TEXT"); + if (node->content == (xmlChar *) &(node->properties)) + fprintf(ctxt->output, " compact\n"); + else if (xmlDictOwns(ctxt->dict, node->content) == 1) + fprintf(ctxt->output, " interned\n"); + else + fprintf(ctxt->output, "\n"); } break; case XML_CDATA_SECTION_NODE: @@ -1005,9 +1011,9 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node) fprintf(ctxt->output, "PBM: doc == NULL !!!\n"); } ctxt->depth++; - if (node->nsDef != NULL) + if ((node->type == XML_ELEMENT_NODE) && (node->nsDef != NULL)) xmlCtxtDumpNamespaceList(ctxt, node->nsDef); - if (node->properties != NULL) + if ((node->type == XML_ELEMENT_NODE) && (node->properties != NULL)) xmlCtxtDumpAttrList(ctxt, node->properties); if (node->type != XML_ENTITY_REF_NODE) { if ((node->type != XML_ELEMENT_NODE) && (node->content != NULL)) { |