[libxml++] Getting content of a "element"(?) node



Hi there.

I´ve been suing libxml++ and I have the following question:
At the w3schools.org (http://www.w3schools.com/xpath/xpath_nodes.asp)
there is a definition of node types, as following:

--------------------------Start of site extract ------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
  <title lang="en">Harry Potter</title>
  <author>J K. Rowling</author>
  <year>2005</year>
  <price>29.99</price>
</book>
</bookstore>'

Example of nodes in the XML document above:
<bookstore>  (document node)
<author>J K. Rowling</author>  (element node)
lang="en"  (attribute node)
---------------------------End of site extract --------------------------------


In libxml++ what type is the <author> node? How could I retrieve its
content, as elements nodes in libxml++ does not have the
'get_content()' method?

In a similar case, I´ve tried extracting the information using
TextNode, ContentNode and ElementNode, without success.

Thanks,
Arthur


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