Menu

Tree [b68b8f] master UI_GXMLCPP_1_4_6 /
 History

HTTPS access


File Date Author Commit
 doc 2008-01-04 srken srken [fe37df] sp->ui: File renamings.
 src 2023-01-09 Stephan Sürken Stephan Sürken [a0b10c] src/tools/[Compat]UnitTests.cpp: Update depreca...
 .gitattributes 2014-07-30 Stephan Sürken Stephan Sürken [cb39c9] .gitattributes: Add hint that --global also wor...
 .gitignore 2014-07-23 Stephan Sürken Stephan Sürken [078508] Add .gitignore file.
 .ui-auto.conf 2023-01-09 Stephan Sürken Stephan Sürken [e1f4b6] .ui-auto.conf: Update Debian git repo to salsa
 AUTHORS 2008-01-04 srken srken [0e669c] sp->ui: Auto updates from our own update script.
 COPYING 2014-07-28 Stephan Sürken Stephan Sürken [7e37eb] COPYING: Update LGPL-2.1 text file to fix FSF p...
 ChangeLog 2023-01-09 Stephan Sürken Stephan Sürken [b68b8f] [ui-auto-release run]: ChangeLog updated from v...
 ChangeLog.historic 2004-05-28 spabsurd spabsurd [39d912] Merging both historic changelogs into one file.
 Doxyfile.in 2023-01-09 Stephan Sürken Stephan Sürken [1e7591] Doxyfile.in: Change PAPER_TYPE (a4wide->a4) (fi...
 Makefile.am 2014-07-23 Stephan Sürken Stephan Sürken [10bd22] Makefile.am: Add .gitignore to dist.
 NEWS 2023-01-09 Stephan Sürken Stephan Sürken [fb76dc] [ui-auto-release run]: News for 1.4.6.
 README 2014-07-23 Stephan Sürken Stephan Sürken [37f01c] README: Updates and fixes.
 configure.ac 2023-01-09 Stephan Sürken Stephan Sürken [27c33d] configure.ac: Prepare 1.4.6 (5:2:0)

Read Me

This is the UI C++ wrapper for libxml.

Abstract
========

"ui-gxmlcpp" is a high-level C++ wrapper around libxml2 and
libxslt. It might be a choice for if your needs are some subset
of:

 - XML DOM Tree parsing.
 - Basic read/write support from/to trees via XPath.
 - Serialization.
 - Stylesheets and stylesheet translation support.
 - XMLSchema and RelaxNG validation.

If your needs are "lower-level" (e.g., proper DOM tree API
support or SAX parsing), "gdome2" or "xml++" will be the right
choices.

Upgrading from 1.0
==================

Update to compatibility code
----------------------------

This should be the first step if you upgrade your code. Source code
upgrading should be rather trivial, and everything is expected to work
as before.

Preliminaries
.............
You might want to use s.th. like

AC_DEFINE(UI_GXMLCPP_IGNORE_DEPRECATED, [], [Remove this and update your code, moron!])

to get rid of the include warnings -- but, rather just update your
code to the new interface. You will have to link against both,
ui-gxmlcpp and ui-gxmlcpp-compat-1.0.

Exceptions
..........

There is no XMLException.hpp include any more. Just remove those
lines.

All catch() blocks must be updated. If you did catch a specific
exception, replace it with s.th like

catch (UI::GXML::CLASS::Exception const & e)
{
	std::cerr << e.what() << std::endl; // or whatever
}

You can also just use a generic catch:

catch (UI::GXML::Exception const & e)
{
	std::cerr << e.what() << std::endl; // or whatever
}


Update to the new interface
---------------------------

The new interface is rather a rewrite. Try to get smart thru the
doxygen docs ;).

However, some often used things can be updated 1 to 1:

Replacing XMLTree with Tree
...........................
OLD                            NEW
getValue()                     getContent().
getXML(xpath)                  dump(xpath).
getSiblingXML(xpath)           dump(xpath + "/*").
addTag(...)                    addChild(...)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.