[xml] Example program tree1.c: Node content always NULL ?


I have compiled the example program tree1.c, but I wanted to get to the content of the nodes. Therefore, I changed its output in line 37 to:

printf("node type: Element, name: %s, value: %s\n", cur_node->name, cur_node->content);

and tested it with :

<?xml version="1.0" ?>

Unfortunately: all content attributes are NULL. The "<ID>1</ID>" e.g. should have content 1, or am I wrong?

Can anyone tell me, what I am doing wrong?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]