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

issue about Yang modules and XML #7

Open
zhaowave opened this issue Jan 4, 2015 · 1 comment
Open

issue about Yang modules and XML #7

zhaowave opened this issue Jan 4, 2015 · 1 comment

Comments

@zhaowave
Copy link

zhaowave commented Jan 4, 2015

I want to know if there is some functions or methods to get a template of self-defined Yang module.so that I can construct a xml stream by template.

@hoangle
Copy link
Member

hoangle commented Jul 7, 2015

Hi,
You can follow with four steps:

  1. Find an object template:
    obj_template_t *obj = ncx_find_object (ncx_module_t *mod, const xmlChar *objname)
  2. Define a val value:
    val_value_t *val = val_new_value();
  3. Construct val from template:
    val_init_from_template(val, obj);
  4. Fill xml stream into val's value

Regards,
Hoang

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