Xmlbeansxx

Last updated
xmlbeansxx
Developer(s) TouK
Preview release
0.9.1 / April 1, 2008 (2008-04-01)
Repository
Type XML binding
License Apache 2.0
Website github.com/TouK   OOjs UI icon edit-ltr-progressive.svg

xmlbeansxx is a software framework for C++ to XML binding. It is open-source software licensed under Apache License 2.0.

Contents

Description

xmlbeansxx is a tool allowing access to XML in a C++ friendly way. It is similar to, and inspired by, the Apache XMLBeans project. Similarly to XMLBeans, xmlbeansxx provide an XML Schema Definition (XSD) 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, the following code handles printing of items from easypo.xml file:

#include"EasyPO.h"#include<iostream>#include<fstream>usingnamespacestd;usingnamespacexmlbeansxx;usingnamespacexmlbeansxx::samples::enumeration::schemaenum::easypo;intmain(){try{fstreamin("easypo.xml",ios::in);PurchaseOrderDocumentpoDoc=PurchaseOrderDocument::Factory::parse(in);LineItemgiftLineItem=poDoc.getPurchaseOrder().addNewLineItem();giftLineItem.setDescription(string("Calendar"));giftLineItem.setPrice(3);giftLineItem.setQuantity(6);giftLineItem.setPerUnitOunces(10);vector<LineItem>arr=poDoc.getPurchaseOrder().getLineItemArray();for(unsignedi=0;i<arr.size();i++){cout<<"item: "<<i<<"\n";cout<<" - description:     "<<arr[i].getDescription()<<"\n";cout<<" - quantity:        "<<arr[i].getQuantity()<<"\n";cout<<" - price:           "<<arr[i].getPrice()<<"\n";cout<<" - amount:          "<<arr[i].getQuantity()*arr[i].getPrice()<<"\n";}cout<<"Xml:\n"<<poDoc.toString()<<"\n";}catch(BeansException&ex){cout<<"BeansException: "<<ex.getMessage()<<"\n";}return0;}

History

The 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 an open source license, for use in commercial projects. It has been used successfully at TouK company in a few commercial projects. xmlbeansxx evolved over the years to fulfill ongoing requirements, so it changed a lot from the initial version.

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

Supported compilers

Initially xmlbeansxx was supported on the GNU Compiler Collection. As of 2008, version 0.9.1 also supported Microsoft Visual Studio compiler. This was done using CMake multiplatform build tool.

See also

Related Research Articles

In computing, a namespace is a set of signs (names) that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified.

<span class="mw-page-title-main">XML</span> Markup language by the W3C for encoding of data

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.

DocBook is a semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware and software, but it can be used for any other sort of documentation.

XSD, a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item content in a document, to assure it adheres to the description of the element it is placed in.

Extensible Application Markup Language is a declarative XML-based language developed by Microsoft for initializing structured values and objects. It is available under Microsoft's Open Specification Promise.

Jakarta XML Binding is a software framework that allows Java EE developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and the inverse, i.e. to unmarshal XML back into Java objects. In other words, JAXB allows storing and retrieving data in memory in any XML format, without the need to implement a specific set of XML loading and saving routines for the program's class structure. It is similar to xsd.exe and XmlSerializer in the .NET Framework.

<span class="mw-page-title-main">JSON</span> Open standard file format and data interchange

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with diverse uses in electronic data interchange, including that of web applications with servers.

XML Information Set is a W3C specification describing an abstract data model of an XML document in terms of a set of information items. The definitions in the XML Information Set specification are meant to be used in other specifications that need to refer to the information in a well-formed XML document.

XMLBeans is a Java-to-XML binding framework which is part of the Apache Software Foundation XML project.

The Common Information Model (CIM) is an open standard that defines how managed elements in an IT environment are represented as a common set of objects and relationships between them.

An entity–attribute–value model (EAV) is a data model optimized for the space-efficient storage of sparse—or ad-hoc—property or data values, intended for situations where runtime usage patterns are arbitrary, subject to user variation, or otherwise unforeseeable using a fixed design. The use-case targets applications which offer a large or rich system of defined property types, which are in turn appropriate to a wide set of entities, but where typically only a small, specific selection of these are instantiated for a given entity. Therefore, this type of data model relates to the mathematical notion of a sparse matrix.

Virtual Token Descriptor for eXtensible Markup Language (VTD-XML) refers to a collection of cross-platform XML processing technologies centered on a non-extractive XML, "document-centric" parsing technique called Virtual Token Descriptor (VTD). Depending on the perspective, VTD-XML can be viewed as one of the following:

MyBatis is a Java persistence framework that couples objects with stored procedures or SQL statements using an XML descriptor or annotations.

<span class="mw-page-title-main">Apache Hive</span> Database engine

Apache Hive is a data warehouse software project built on top of Apache Hadoop for providing data query and analysis. Hive gives an SQL-like interface to query data stored in various databases and file systems that integrate with Hadoop. Traditional SQL queries must be implemented in the MapReduce Java API to execute SQL applications and queries over distributed data. Hive provides the necessary SQL abstraction to integrate SQL-like queries (HiveQL) into the underlying Java without the need to implement queries in the low-level Java API. Since most data warehousing applications work with SQL-based querying languages, Hive aids the portability of SQL-based applications to Hadoop. While initially developed by Facebook, Apache Hive is used and developed by other companies such as Netflix and the Financial Industry Regulatory Authority (FINRA). Amazon maintains a software fork of Apache Hive included in Amazon Elastic MapReduce on Amazon Web Services.

In the C++ programming language, input/output library refers to a family of class templates and supporting functions in the C++ Standard Library that implement stream-based input/output capabilities. It is an object-oriented alternative to C's FILE-based streams from the C standard library.

Zorba is an open source query processor written in C++, implementing

gSOAP is a C and C++ software development toolkit for SOAP/XML web services and generic XML data bindings. Given a set of C/C++ type declarations, the compiler-based gSOAP tools generate serialization routines in source code for efficient XML serialization of the specified C and C++ data structures. Serialization takes zero-copy overhead.

Apache SystemDS is an open source ML system for the end-to-end data science lifecycle.

Oracle TopLink is a mapping and persistence framework for Java developers. TopLink is produced by Oracle and is a part of Oracle's OracleAS, WebLogic, and OC4J servers. It is an object-persistence and object-transformation framework. TopLink provides development tools and run-time functionalities that ease the development process and help increase functionality. Persistent object-oriented data is stored in relational databases which helps build high-performance applications. Storing data in either XML or relational databases is made possible by transforming it from object-oriented data.