Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load xml into capnp #27

Closed
duck2 opened this issue Oct 20, 2019 · 1 comment
Closed

Load xml into capnp #27

duck2 opened this issue Oct 20, 2019 · 1 comment

Comments

@duck2
Copy link
Member

duck2 commented Oct 20, 2019

We can generate cap'n proto schemas and load XML files, but we cannot load XML into the cap'n proto generated structures. Implementing it would be really helpful since a single interface would be enough for handling both Cap'n Proto and XML files.

Preferably, from a foo.xsd file, we generate a foo_uxsdcap.capnp, foo_uxsdcap.h and foo_uxsdcap.cpp.

#include "foo_uxsdcap.capnp.h"
#include "foo_uxsdcap.h"

int main(){
    try {
        ucap::Foo::Reader& foo = ucap::get_root_xml(std::cin);
    } catch {
        std::cout << "PugiXML parse failure\n";
    }
    ucap::put_root_xml(foo, std::cout);
    /* std::cout << foo? */
}
@litghost
Copy link
Contributor

This has been completed on the interface-consumer branch.

@duck2 duck2 closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants