aboutsummaryrefslogtreecommitdiffstats
path: root/debugXML.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-07-12 01:20:08 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-07-12 01:20:08 +0000
commit7db3773a5cdafd122df5b69ba90be82535d46069 (patch)
treed981c827684eb3a744a7d5d0b3f38d304a715f7a /debugXML.c
parent96037891e6b5c45f2d15601b36ed00fe5404f08b (diff)
downloadandroid_external_libxml2-7db3773a5cdafd122df5b69ba90be82535d46069.tar.gz
android_external_libxml2-7db3773a5cdafd122df5b69ba90be82535d46069.tar.bz2
android_external_libxml2-7db3773a5cdafd122df5b69ba90be82535d46069.zip
store the line numbder in element->content, may break some software, need
* DOCBparser.c HTMLparser.c HTMLtree.c SAX.c debugXML.c parser.c tree.c xpointer.c: store the line numbder in element->content, may break some software, need a configuration mechanism Daniel
Diffstat (limited to 'debugXML.c')
-rw-r--r--debugXML.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/debugXML.c b/debugXML.c
index 92d71cb2..a36ad03a 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -248,7 +248,8 @@ xmlDebugDumpElemDecl(FILE *output, xmlElementPtr elem, int depth) {
fprintf(output, ", MIXED ");
break;
}
- if (elem->content != NULL) {
+ if ((elem->type != XML_ELEMENT_NODE) &&
+ (elem->content != NULL)) {
char buf[5001];
buf[0] = 0;
@@ -602,7 +603,8 @@ void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) {
if (node->properties != NULL)
xmlDebugDumpAttrList(output, node->properties, depth + 1);
if (node->type != XML_ENTITY_REF_NODE) {
- if (node->content != NULL) {
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->content != NULL)) {
shift[2 * i] = shift[2 * i + 1] = ' ' ;
shift[2 * i + 2] = shift[2 * i + 3] = 0 ;
fprintf(output, shift);
@@ -818,7 +820,8 @@ xmlDebugDumpEntityCallback(xmlEntityPtr cur, FILE *output) {
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
if (cur->orig != NULL)
fprintf(output, "\n orig \"%s\"", cur->orig);
- if (cur->content != NULL)
+ if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->content != NULL))
fprintf(output, "\n content \"%s\"", cur->content);
fprintf(output, "\n");
}