Skip to content

How to parse a kdl file with comment, change a value then write it back with comments? #16

@Gitzzq

Description

@Gitzzq

I tried to change KDL_DEFAULTS to KDL_EMIT_COMMENTS then I got "Invalid event from kdl_parser" exception....

Document parse(std::u8string_view kdl_text)
{
    kdl_str text = {reinterpret_cast<char const*>(kdl_text.data()), kdl_text.size()};
    kdl_parser* parser = kdl_create_string_parser(text, KDL_EMIT_COMMENTS);
    //                                                  ~~~~~~~~~~~~~~~~~~
}

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions