xmlbeansxx

Table of Contents
Source code


You can access source code from our xmlbeansxx git repository

Download


You can download xmlbeansxx from sourceforge



Copyright © 2004-2009 touk.pl
All rights reserved.



Welcome to xmlbeansxx - Open Source C++ XML manipulation library

About xmlbeansxx

xmlbeansxx is an open source C++ library easing the processing of XML data.
It is very similar to and in fact was inspired by Apache XMLBeans.
The goal is to have the same functionalities and interfaces of XMLBeans.

You can find good introduction on devx.com article about xmlbeansxx
http://www.devx.com/cplus/Article/28656/0
or you can read pdf version from here :
Manipulate_XML_Documents_in_CPP_with_xmlbeansxx.pdf

Documentation

Checkout xmlbeansxx documentation
Doxygen generated documentation:  xmlbeansxx-doc.zip, browsing online: http://top.touk.pl/resources/xmlbeansxx/doc/html/

Source code

Xmlbeansxx source code is available under the terms of Apache License 2.0 from http://top.touk.pl/git/xmlbeansxx

Issue tracker

Please report any spotted problems on jira here: http://top.touk.pl/jira/browse/XMLBEANSXX

Download

You can download binaries from http://top.touk.pl/resources/xmlbeansxx/releases/

Or http://sourceforge.net/project/showfiles.php?group_id=118556 (deprecated)

Features

Easy access to XML Schema based XML data through generated C++ classes.
Easy iteration over any XML data, even with no schema file, through XmlCursor iterators.
Runtime XPath queries, through XQuery technology (being implemented).
Memory safe - uses boost::smart_ptr technology.
Clear, configurable logging - uses log4cxx.
Fast & lightweighted

Requirements

Supported Operating Systems:

Linux (tested under RedHat, PLD, and Debian)
Windows
Mac

Installed libraries (required):

cmake or autotools
maven
xerces-c
boost

Installed libraries (recommended):

log4cxx
gmpxx
CppUnit - for testing

Labels

xml xml Delete
xmlbeans xmlbeans Delete
schema schema Delete
xmlbeansxx xmlbeansxx Delete
c++ c++ Delete
xsd xsd Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 13, 2009

    Anonymous says:

    Fajnie, że się pojawiła jakaś dokumentacja , szkoda tylko, że jest nieaktualna ...

    Fajnie, że się pojawiła jakaś dokumentacja , szkoda tylko, że jest nieaktualna

    Pozdrawiam

    Paweł Stawicki

    1. May 20, 2009

      Anonymous says:

      Paweł bo to jest stara leśna dokumentacji c&p do confluence. Oczywiście moż...

      Paweł bo to jest stara leśna dokumentacji c&p do confluence.

      Oczywiście możesz się zarejestrować i ją poprawić

      1. May 20, 2009

        Anonymous says:

        Kuba
    2. Jun 04, 2009

      Rafał Rusin says:

      Dodałem dokumentację wygenerowaną z doxygena. Wkrótce będzie też możliwość przeg...

      Dodałem dokumentację wygenerowaną z doxygena. Wkrótce będzie też możliwość przeglądania jej online.

      1. Jul 27, 2009

        Rafał Rusin says:

        Już jest

        Już jest

  2. May 21, 2009

    Anonymous says:

    what's the latest on xpath. I can only run xpath on a generic XmlDocument. ...

    what's the latest on xpath. I can only run xpath on a generic XmlDocument.  Trying to run on a typed generated document leads to an index out of bounds exception.

    -- dan

    1. May 21, 2009

      Anonymous says:

      apparently the issue is in StoreString.  StoreString->IsStored returns t...

      apparently the issue is in StoreString.  StoreString->IsStored returns true, but the index is behind the size of StringStorage.

    2. May 22, 2009

      Anonymous says:

      Looks like i created a DLL that uses xmlbeansxx.lib, and an application that lin...

      Looks like i created a DLL that uses xmlbeansxx.lib, and an application that links in xmlbeanxx.lib and the DLL.  Apparently StringStorage uses a static global variable, and there is a separate instance of this in the DLL and the static LIB.  Hence the problem.  I'm going to put xmlbeansxx into a DLL, so I can work around this.

      1. Jun 03, 2009

        Rafał Rusin says:

        Quite advanced bug StringStorage is a class for conserving space for strings, ...

        Quite advanced bug

        StringStorage is a class for conserving space for strings, which are contained in schema. I don't remember exactly, but I think you can avoid this problem by modifying

        bool StoreString::isStored() const
        

        to return always false.

        This will cause a bit more memory consumption, but should avoid your problem.

        Regards

        1. Jul 15, 2009

          Fernando says:

          Hi, the solution of change the isStored method doesn't work. In some point, the ...

          Hi, the solution of change the isStored method doesn't work. In some point, the StoreString::free() is called and the delete instruction fails:

          void StoreString::free(){   
          if (!isStored() && buf!=0) {       
           delete[] ((char *)buf); //fails when isStored returns allways false   
          }   
          buf=0;}
          

          I am using the 0.9.7 version of xmlbeansxx

          Regards

          Fernando

      2. Jul 15, 2009

        Anonymous says:

        Hello, a have the same problem. When a xml objects goes from a dll to another dl...

        Hello, a have the same problem. When a xml objects goes from a dll to another dll, its properties dissapears. (I think is the the StoreString object and the map of properties)

        The works around of put xmlbeans in a dll works?

        Regards

        Fernando

        1. Oct 18

          Dan Greve says:

          Yes, the DLL worked for me.  However, i needed to modify a number of files ...

          Yes, the DLL worked for me.  However, i needed to modify a number of files in xmlbeansxx to properly dllexport all the necessary symbols.

          I'm the original anonymous coward from this thread.

          -- dan

  3. Jun 17, 2009

    Anonymous says:

    Hello, I have recently tried to build xmlbeansxx. I've managed to generate the ...

    Hello,

    I have recently tried to build xmlbeansxx. I've managed to generate the visual studio  sln, but i got stuck at building the library. I get an error about Maven tool working offline even if Maven is set to work online in settings files. Anyone knows a workaround for this issue? Thank you!

    Here is the error message i get:

    1>NOTE: Maven is executing in offline mode. Any artifacts not already in your local
    1>repository will be inaccessible.
    1>[INFO] Scanning for projects...
    1>[INFO] ------------------------------------------------------------------------
    1>[INFO] Building XMLBeansxx Generator
    1>[INFO]    task-segment: [package]
    1>[INFO] ------------------------------------------------------------------------
    1>[INFO] ------------------------------------------------------------------------
    1>[ERROR] BUILD ERROR
    1>[INFO] ------------------------------------------------------------------------
    1>[INFO] Error building POM (may not be this project's POM).
    1>Project ID: org.apache.maven.plugins:maven-resources-plugin
    1>Reason: POM 'org.apache.maven.plugins:maven-resources-plugin' not found in repository: System is offline.
    1>  org.apache.maven.plugins:maven-resources-plugin:pom:2.3
    1> for project org.apache.maven.plugins:maven-resources-plugin
    1>[INFO] ------------------------------------------------------------------------
    1>[INFO] For more information, run Maven with the -e switch

    1. Jul 27, 2009

      Rafał Rusin says:

      Try following patch: Index: generator/CMakeLists.txt =========================...

      Try following patch:

       Index: generator/CMakeLists.txt
      ===================================================================
      --- generator/CMakeLists.txt	(revision 12874)
      +++ generator/CMakeLists.txt	(working copy)
      @@ -32,7 +32,7 @@
       )
      
       ADD_CUSTOM_COMMAND(OUTPUT ${GEN_BINFILES} ${GEN_LIBFILES} ${GEN_JAR}
      -	COMMAND ${MVN_PROG} -o -Dbase=${CMAKE_CURRENT_SOURCE_DIR} -Prelease package
      +	COMMAND ${MVN_PROG} -Dbase=${CMAKE_CURRENT_SOURCE_DIR} -Prelease package
       	MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/pom.xml
       	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pom.xml
       )
      
      
      1. Oct 18

        Dan Greve says:

        thx, this patch will help in future builds -- dan

        thx, this patch will help in future builds

        -- dan

  4. Jul 27, 2009

    Fernando says:

    Hi, i have a linking problem with enum and static const int   class Enum {...

    Hi, i have a linking problem with enum and static const int

      class Enum {
      public:
        static const int length = 3;
        static const int INT_G_2_S_REQUEST = 0;
        static const int INT_G_2_S_RESPONSE = 1;
        static const int INT_G_2_S_NOTIFICATION = 2;

    ...

    undefined reference to `com::gamingstandards::g2S::schemas::v103::TSessionTypes::Enum::INT_G_2_S_REQUEST'

    This error happen in gcc 4.3.3 and not in visual studio.

    ¿Any ideas?

    I am using the 0.9.7 version of xmlbeansxx

    Regards

    Fernando

  5. Aug 07, 2009

    Anonymous says:

    Hi everybody,   I saw on the Apache XMLBeans site that there were a whish ...

    Hi everybody,

      I saw on the Apache XMLBeans site that there were a whish (an incubation project) to add C++ capabilities to the Apache XMLBeans project starting from the Xmlbeansxx tool. Is this idea still in the air? If yes, I will be interested to collaborate with others on this project.

      KR,

      Marc

    1. Aug 12, 2009

      Kuba Nowakowski says:

      Hi Marc Yes this is the old wish We put current xmlbeansxx version in few pr...

      Hi Marc

      Yes this is the old wish

      We put current xmlbeansxx version in few production projects, however we were stopped by apache meritocracy and our laziness.

      If you are interested in collaborate feel free to send us proposal what would you like to do?

      For sure we will try to help.

      Best regards

      Kuba

    2. Oct 07

      Rafał Rusin says:

      I've set up repository on github, so we can gather contributors there. If you ar...

      I've set up repository on github, so we can gather contributors there. If you are interested, please check out "getting involved section".

      Regards

      1. Oct 18

        Dan Greve says:

        I didn't see a getting involved section on github, so i just created a repositor...

        I didn't see a getting involved section on github, so i just created a repository to browse.  I'm interested in adding the shared dll library, and what it might take to do xpath support.

        -- dan

        1. Dec 12

          Anonymous says:

          Getting involed section is on this site. Regards

          Getting involed section is on this site.

          Regards

          1. Jan 29

            Dan Greve says:

            yup, saw it after i posted.

            yup, saw it after i posted.

  6. Jan 22

    William Ma says:

    Hi, I currently have the XMLBeansxx built and installed in Cygwin. Is it possi...

    Hi,

    I currently have the XMLBeansxx built and installed in Cygwin. Is it possible to build XmlBeansxx as a Visual Studio project in Windows? If yes, then how?

    Regards,

    -William

    1. Jan 22

      Rafał Rusin says:

      Yes, this is possible and we actually did some development in Visual Studio. Yo...

      Yes, this is possible and we actually did some development in Visual Studio.

      You can generate projects using those 2 scripts:

      vsbootstrap.bat
      vsbootstrapr.bat
      

      First is for DEBUG and second for RELEASE configuration.

      It uses CMake's generator for Visual Studio projects.

  7. Jan 28

    William Ma says:

    Thanks for the help on my previous question! I have another question: Which ve...

    Thanks for the help on my previous question!

    I have another question: Which version of Boost and Xerces-c libraries is being used in XmlBeansxx v0.9.8 (for building and running it in MS VS 2008)?

    Regards,

    1. Jan 29

      Paweł Stawicki says:

      Any boost version should work. When not let me know. We have tested xmlbeansxx...

      Any boost version should work.

      When not let me know.

      We have tested xmlbeansxx with  boost 1.35 on VS 2005.

      Best Regards,

      Paweł

      1. Jan 29

        Dan Greve says:

        I use boost 1.37 and Xerces-c 2.8.0, also with VS 2005. Dan G

        I use boost 1.37 and Xerces-c 2.8.0, also with VS 2005.

        Dan G

      2. Feb 11

        William Ma says:

        I've just tested XmlBeansxx with Boost 1.35 on VS2008. Debug build is fine, but ...

        I've just tested XmlBeansxx with Boost 1.35 on VS2008. Debug build is fine, but Release build(or any build with NDEBUG is defined) will fail due to a bug in the Boost/range/iterator_range.hpp-is_singular() function. Upgrade Boost to 1.36 can fix it (or replace the 1.35 is_singular() implementation by the one in 1.36).

    2. Feb 08

      William Ma says:

      Thanks for the reply! Yes, I successfully get Xmlbeansxx working with VS2008, an...

      Thanks for the reply! Yes, I successfully get Xmlbeansxx working with VS2008, and I'm using boost 1.41 with Xerces 2.6.0

      In fact, i spent much less time to get it working under VS2008 comparing to build it in Cygwin!

      Again, thanks for the help everyone!

      1. Feb 09

        Rafał Rusin says:

        Great. If you want it running under xerces 3, I did small fixes. It's currently...

        Great.

        If you want it running under xerces 3, I did small fixes. It's currently here: http://github.com/rafalrusin/xmlbeansxx. I'll move it to top soon.

        Regards

        1. Feb 12

          Rafał Rusin says:

          OK, moved to top http://top.touk.pl/git?p=xmlbeansxx;a=summary
  8. Jan 29

    Dan Greve says:

    I found a bug in CoreTypes.h.  Line 69 should be changed from   ...

    I found a bug in CoreTypes.h.  Line 69 should be changed from

        typedef long int mpz_class;

    to

        typedef long long mpz_class;

    long int on Windows 32-bit is only 4 bytes, and is insufficient to represent 8 byte data types, such as xs:long

    Dan G

    1. Jan 29

      Rafał Rusin says:

      Could you fill a jira entry for it and attach a patch (using for example git dif...

      Could you fill a jira entry for it and attach a patch (using for example git diff)?

      http://top.touk.pl/jira/browse/XMLBEANSXX

      Regards

      1. Jan 30

        Dan Greve says:

        I'll give it a try.  yet another cm tool to learn.  I created a git br...

        I'll give it a try.  yet another cm tool to learn.  I created a git branch last year, just never got around to trying it out

        1. Feb 12

          Rafał Rusin says:

          Jira is quite common, at least in open source. It's worth trying out.

          Jira is quite common, at least in open source. It's worth trying out.

Add Comment