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

« back to all changes in this revision

Viewing changes to examples/dom_build/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:
31
31
int
32
32
main(int argc, char* argv[])
33
33
{
 
34
  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
34
35
  try
35
36
  {
 
37
  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED
36
38
    xmlpp::Document document;
37
39
    document.set_internal_subset("example_xml_doc", "", "example_xml_doc.dtd");
38
40
 
57
59
    Glib::ustring whole = document.write_to_string();
58
60
    std::cout << "XML built at runtime: " << std::endl << whole << std::endl;
59
61
    std::cout << "default namespace: " << nodeRoot->get_namespace_uri() << std::endl;
 
62
  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
60
63
  }
61
64
  catch(const std::exception& ex)
62
65
  {
63
66
    std::cout << "Exception caught: " << ex.what() << std::endl;
64
67
  }
 
68
  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED
65
69
 
66
70
  return 0;
67
71
}