c++ xml data binding

128

Solution 1

I'm using the open-source GSOAP toolkit from SourceForge for XML C++ auto-serialization. Also works for plain C. It binds C/C++ to XML schemas automatically and is fully compliant with industry standards for XML, WSDL, SOAP, REST, XML-RPC, JSON, and WS-* protocols. It's pretty efficient too.

Solution 2

Codalogic LMX

It has a free version and paid license version as well.

Share:
128
user1578872
Author by

user1578872

Updated on June 08, 2022

Comments

  • user1578872
    user1578872 almost 2 years

    I would like to have a dynamic ng-model name in the below scenario. On selecting department box, I will be painting the form.

    It works with, ng-model="department.name", but it is causing some other issue as we have some other internal stuff. I would like to have the name as ng-model={{department.name}}, so that the name itself will be dynamic.

    <div ng-app >
        <ul ng-repeat="department in selectedDepartments">
            <li>
                <div>{{department.id}}</div>
                <input type="text" ng-model={{department.name}}" >
            </li>
        </ul>
    </div>
    

    function DepartmentController($scope) {
    
        $scope.selectedDepartments = {};
    
        $scope.departments = [
        "audit": [{id:0,name:"auditDept0"},{id:0,name:"auditDept1"}],
        "hr": [{id:0,name:"hrDept0"},{id:0,name:"hrDept1"}],
        "finance": [{id:0,name:"financeDept0"},{id:0,name:"financeDept1"}]
        ];
    
        $scope.selectDepartment = function(name) {
          if(name=="hr") {
            $scope.selectedDepartments =     $scope.departments.hr;
          } else if(name=="finance") {
            $scope.selectedDepartments =     $scope.departments.finance;
          }
        }
    }​
    

    I tried creating a directive as below.

    this.app.directive('dynamicModel', ['$compile', '$parse', function ($compile, $parse) {
        return {
            restrict: 'A',
            terminal: true,
            priority: 100000,
            link: function (scope, elem) {
                var name = $parse(elem.attr('dynamic-model'))(scope);
                elem.removeAttr('dynamic-model');
                elem.attr('ng-model', name);
                $compile(elem)(scope);
            }
        };
    }]);
    

    But, still, I am unable to use as dynamic-model={{department.name}}.

    Thanks

  • Paul Coccoli
    Paul Coccoli almost 12 years
    Boost Serialization does serialization, not XML data binding. In other words, you cannot generate code from your schema. Am I missing something?
  • d-_-b
    d-_-b over 11 years
    I second this. The docs are a bit strange, but it's mostly all in there.
  • Nguyễn Đức Tâm
    Nguyễn Đức Tâm over 4 years
    @PaulCoccoli are you sure about this??