Xmlbeansxx

Xmlbeansxx

Infobox Software
name= xmlbeansxx
developer= TouK
maintainer =TouK
latest_release_version= 0.9.1
latest_release_date= Apr 1, 2008
operating_system= Cross-platform
genre = XML binding
license = Apache License 2.0
website= http://xmlbeansxx.touk.pl

xmlbeansxx is a C++-to-XML binding framework which is software based on Apache License 2.0 Open Source license.

Description

xmlbeansxx is a tool that allows access to XML in a C++ friendly way. It is similar and in fact inspired by Apache XMLBeans project. Similarly to XMLBeans, xmlbeansxx provide an XML Schema instance to C++ code generator. The generated code can be later invoked to access XML instance document data.

Example

Given an example of a simple XML Schema Definition describing a Purchase Order, as shown in examples from Apache XMLBeans distribution package, a following code handles printing of items from easypo.xml file:


#include "EasyPO.h"
#include
#include

using namespace std;using namespace xmlbeansxx;using namespace xmlbeansxx::samples::enumeration::schemaenum::easypo;

int main() {

try { fstream in("easypo.xml", ios::in); PurchaseOrderDocument poDoc=PurchaseOrderDocument::Factory::parse(in);

LineItem giftLineItem = poDoc.getPurchaseOrder().addNewLineItem(); giftLineItem.setDescription(string("Calendar")); giftLineItem.setPrice(3); giftLineItem.setQuantity(6); giftLineItem.setPerUnitOunces(10);

vector arr = poDoc.getPurchaseOrder().getLineItemArray(); for(unsigned i=0; i < arr.size() ; i++) { cout << "item: " << i << " "; cout << " - description: " << arr [i] .getDescription() << " "; cout << " - quantity: " << arr [i] .getQuantity() << " "; cout << " - price: " << arr [i] .getPrice() << " "; cout << " - amount: " << arr [i] .getQuantity() * arr [i] .getPrice() << " "; }

cout << "Xml: " << poDoc.toString() << " ";

} catch (BeansException &ex) { cout<<"BeansException: "<

History

xmlbeansxx project begun in 2004 as an effort to implement a part of Apache XMLBeans in C++. The project goal was to create an XML binding tool, based on Open Source license, for use in commercial projects. In fact, it's been successfully used at TouK in a few commercial projects. xmlbeansxx evolved over the years to fulfill ongoing requirements, so it changed a lot from initial version.

The project was submitted to The Apache Incubator in 2005, under a name xmlbeanscxx. However it didn't obtain much development effort. This was mainly because one of the supporting companies decided to change their objectives and quit. Although, the project is still in development at TouK company, the initial contributor.

Supported Compilers

Initially xmlbeansxx was supported on GNU Compiler Collection. However the recent version 0.9.1 supports also Microsoft Visual Studio compiler. This was done using CMake multiplatform build tool.

See also

* Apache XMLBeans
* XML data binding

External links

* [http://xmlbeansxx.touk.pl/ Project homepage]
* [http://incubator.apache.org/xmlbeanscxx/ Project submitted to Apache Incubator as xmlbeanscxx]
* [http://www.touk.pl/ TouK company homepage]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • List of open source software packages — This is a list of open source software packages: computer software licensed under an open source license. Software that fits the Free software definition may be more appropriately called free software; the GNU project in particular objects to… …   Wikipedia

  • XML data binding — refers to the process of representing the information in an XML document as an object in computer memory. This allows applications to access the data in the XML from the object rather than using the DOM to retrieve the data from a direct… …   Wikipedia

  • XMLBeans — Infobox Software name = Apache XMLBeans caption = developer = Apache Software Foundation latest release version = 2.4.0 latest release date = release date|2008|07|08 latest preview version = latest preview date = operating system = Cross platform …   Wikipedia

  • List of free and open source software packages — This article is about software free to be modified and distributed. For examples of software free in the monetary sense, see List of freeware. This is a list of free and open source software packages: computer software licensed under free… …   Wikipedia

  • XML-Datenbindung — (englisch XML data binding) ist in der Objektorientierung der Prozess der Abbildung von XML Dokumenten auf Objekte bzw. die Repräsentation von XML Dokumenten durch Objekte und vice versa. Dieser Prozess erlaubt es Programmierern, auf XML Daten… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”