 |
libyang
1.0.101
YANG data modeling language library
|
Go to the documentation of this file.
20 #include "Internal.hpp"
53 S_Xml_Elem
Xml_Elem::child() {
return elem->
child ? std::make_shared<Xml_Elem>(context, elem->child, deleter) :
nullptr;}
54 S_Xml_Elem
Xml_Elem::next() {
return elem->
next ? std::make_shared<Xml_Elem>(context, elem->
next, deleter) :
nullptr;}
55 S_Xml_Elem
Xml_Elem::prev() {
return elem->
prev ? std::make_shared<Xml_Elem>(context, elem->
prev, deleter) :
nullptr;}
57 const
char *
Xml_Elem::get_attr(const
char *name, const
char *ns) {
62 return elem->
ns ? std::make_shared<Xml_Ns>((
struct lyxml_ns *)
ns, deleter) :
nullptr;
72 std::string s_data = data;
78 std::vector<S_Xml_Elem> s_vector;
82 s_vector.push_back(std::make_shared<Xml_Elem>(context, elem, deleter));
88 std::vector<S_Xml_Elem> s_vector;
92 s_vector.push_back(std::make_shared<Xml_Elem>(context, elem, deleter));
int lyxml_print_mem(char **strp, const struct lyxml_elem *elem, int options)
Dump XML tree to a IO stream.
struct lyxml_elem * parent
std::vector< S_Xml_Elem > tree_for()
Structure describing an element in an XML tree.
Public API of libyang XML parser.
Element's attribute definition.
Class implementation for libyang C header xml.h.
The main libyang public header.
#define LY_TREE_DFS_BEGIN(START, NEXT, ELEM)
Macro to iterate via all elements in a tree. This is the opening part to the LY_TREE_DFS_END - they a...
std::string print_mem(int options)
S_Xml_Ns get_ns(const char *prefix)
#define LY_TREE_FOR(START, ELEM)
Macro to iterate via all sibling elements without affecting the list itself.
#define LY_TREE_DFS_END(START, NEXT, ELEM)
std::vector< S_Xml_Elem > tree_dfs()
const char * lyxml_get_attr(const struct lyxml_elem *elem, const char *name, const char *ns)
Get value of the attribute in the specified element.
const struct lyxml_ns * ns
const struct lyxml_ns * lyxml_get_ns(const struct lyxml_elem *elem, const char *prefix)
Get namespace definition of the given prefix in context of the specified element.
class for wrapping lyxml_ns.
Xml_Ns(const struct lyxml_ns *ns, S_Deleter deleter)