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

« back to all changes in this revision

Viewing changes to examples/dom_xpath/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:
52
52
  else
53
53
    filepath = "example.xml";
54
54
 
 
55
  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
55
56
  try
56
57
  {
 
58
  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED 
57
59
    xmlpp::DomParser parser(filepath);
58
60
    if(parser)
59
61
    {
81
83
        xpath_test(root, "//xref/@linkend");
82
84
      }
83
85
    }
 
86
  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
84
87
  }
85
88
  catch(const std::exception& ex)
86
89
  {
87
90
    std::cout << "Exception caught: " << ex.what() << std::endl;
88
91
  }
 
92
  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED 
89
93
 
90
94
  return 0;
91
95
}