| Categories: data container,import/export,wrapper | Status: STABLE |  |
| Author: Francesco Montorsi | wxWidgets supported ports: all |
| Current maintainer: Francesco Montorsi | wxWidgets supported versions: 2.6, 2.8 |
| Latest version: 1.8 | Build system: Bakefile-based |
| Programming language: C++ | Samples provided: 1 |
| External dependencies: libxml2, iconv (built-in for win32) | Documentation: doxygen |
|
| Description: A simple set of classes, wxXml2Namespace, wxXml2Property, wxXml2Node, wxXml2DTD and wxXml2Document, that interfaces wxWidgets with libxml2.
With this component you can add load/save/edit XML support to your wxWidgets application using all the power of a well-known library like libxml2.
The full support for DTDs allows you to easily check your XML documents & thus to
produce well-formed XML files. Unicode and shared builds are completely supported as well.
|
|
| Links for wxXml2: › Website | › Screenshots | › Documentation | › Browse Subversion | › Download | › Edit this component's info (for maintainers only) |
wxXml2Document doc;
if (!doc.Load("myfile.xml"))
return false;
if (doc.GetRoot()->GetName() != "myroot-node")
return false;
wxXml2Node *child = doc.GetRoot()->GetChildren();
while (child) {
if (child->GetName() == "tag1") {
wxString content = child->GetNodeContent();
...
wxString attrvalue1 =
child->GetProperty("attr1", "default-value");
wxString attrvalue2 =
child->GetProperty("attr2", "default-value");
...
} else if (child->GetName() == "tag2") {
}
child = child->GetNext();
}
Obviously, since wxXml2 is not an application but just a wrapper for the libxml2 library,
the following screenshots refers to the sample app included with this module which shows
how much easy is to get the tree structure of an XML doc through wxXml2 classes:
The doxygen-generated documentation for this component is available online
here. Please let me know if you think something is missing.
None. To submit a bug report please look at wxCode FAQ.
Support for libxsl.
To submit a feature request please look at wxCode FAQ.