~ubuntu-branches/ubuntu/natty/libxml++2.6/natty

« back to all changes in this revision

Viewing changes to examples/textreader/main.cc

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-09-18 11:32:24 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20070918113224-7x031mzf1shoozxx
Tags: 2.20.0-0ubuntu1
* New upstream release:
  - Element: Added get_attribute_value(), to get a simple text value for an
    attribute.
  - Added an experimental --enable-api-exceptions configure option, to allow
    libxml++ to build without exceptions.
* debian/libxml++2.6-doc.docs: 2.18 -> 2.20.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 int
46
46
main(int argc, char* argv[])
47
47
{
 
48
  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
48
49
  try
49
50
  {
 
51
  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED
50
52
    xmlpp::TextReader reader("example.xml");
51
53
 
52
54
    while(reader.read())
77
79
        std::cout << indent(depth) << "novalue" << std::endl;
78
80
 
79
81
    }
 
82
  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
80
83
  }
81
84
  catch(const std::exception& e)
82
85
  {
83
86
    std::cout << "Exception caught: " << e.what() << std::endl;
84
87
  }
 
88
  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED
85
89
}
86
90