[xml] toString and xmlXPathCastNodeToString



Hi,

For some time I have been a happy user of Perl's XML::LibXML module.
Today I made a little exercise in porting one of my simple scripts into
C. The purpose of the script is to print out the relevant XML fragments
that match a given XPath expression. I am having trouble in translating
this perl construct

print $node->toString;

into C. In Perl this prints the XML fragment with the element names etc.
whereas in C 

printf("%s", xmlXPathCastNodeToString(node));

prints out only the element content. Is there a way to change the
behaviour of this functions or is there another function to do the job? 

Best wishes,

Manne Miettinen



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