[xml] xmlNodePtr->content always empty?



Hello,

it seems to me as xmlNodePtr->content is always empty, although in the
document there is something!
My XML-testfile is:

<?xml version="1.0" encoding="UTF-8"?>
<objects>asd</objects>

And now, when I get a xmlNodePtr cur; via XPath, cur->name is right
("objects"), but cur->content is empty or someting like that... I can't
print it to the screen using cout or use it in any other way, but cout
behaves weird:

cout << "test: " << cur->content << endl;

leads to "test: ", but no new line at the end.

I hope you can help me! (I know that I'm likely simply to blind or
stupid to see my mistake...)


Thanks,

Nils Schnabel

(I'm  using libxml 2.6.6 on Mandrake Linux 10 CE)







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