Changeset ca974d7 for lib/xmltree.c
- Timestamp:
- 2011-12-04T19:14:29Z (13 years ago)
- Branches:
- master
- Children:
- df98ee8
- Parents:
- bd31661
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/xmltree.c
rbd31661 rca974d7 330 330 /* Indentation */ 331 331 for( c = node; c->parent; c = c->parent ) 332 printf(" " );332 fprintf( stderr, " " ); 333 333 334 334 /* Start the tag */ 335 printf("<%s", node->name );335 fprintf( stderr, "<%s", node->name ); 336 336 337 337 /* Print the attributes */ … … 339 339 { 340 340 char *v = g_markup_escape_text( node->attr[i].value, -1 ); 341 printf(" %s=\"%s\"", node->attr[i].key, v );341 fprintf( stderr, " %s=\"%s\"", node->attr[i].key, v ); 342 342 g_free( v ); 343 343 } … … 348 348 if( node->text == NULL && node->children == NULL ) 349 349 { 350 printf("/>\n" );350 fprintf( stderr, "/>\n" ); 351 351 return; 352 352 /* Then we're finished! */ … … 354 354 355 355 /* Otherwise... */ 356 printf(">" );356 fprintf( stderr, ">" ); 357 357 358 358 /* Only print the text if it contains more than whitespace (TEST). */ … … 363 363 { 364 364 char *v = g_markup_escape_text( node->text, -1 ); 365 printf("%s", v );365 fprintf( stderr, "%s", v ); 366 366 g_free( v ); 367 367 } … … 369 369 370 370 if( node->children ) 371 printf("\n" );371 fprintf( stderr, "\n" ); 372 372 373 373 for( c = node->children; c; c = c->next ) … … 376 376 if( node->children ) 377 377 for( c = node; c->parent; c = c->parent ) 378 printf(" " );378 fprintf( stderr, " " ); 379 379 380 380 /* Non-empty tag is now finished. */ 381 printf("</%s>\n", node->name );381 fprintf( stderr, "</%s>\n", node->name ); 382 382 } 383 383
Note: See TracChangeset
for help on using the changeset viewer.