<libroxml
version="3.0.2"
/>
|
XML document navigation module. More...
#include "roxml_internal.h"
Go to the source code of this file.
Functions | |
ROXML_API node_t * | roxml_get_prev_sibling (node_t *n) |
prev sibling getter function | |
ROXML_API node_t * | roxml_get_next_sibling (node_t *n) |
next sibling getter function | |
ROXML_API node_t * | roxml_get_parent (node_t *n) |
parent getter function | |
ROXML_API node_t * | roxml_get_root (node_t *n) |
root getter function | |
XML document navigation module.
(C) Copyright 2014 Tristan Lelong trist.nosp@m.an.l.nosp@m.elong.nosp@m.@lib.nosp@m.roxml.nosp@m..net
SPDX-Licence-Identifier: LGPL-2.1+ The author added a static linking exception, see License.txt.
Definition in file roxml_nav.c.
next sibling getter function
This function returns the next sibling of a given node
n | is one node of the tree |
Definition at line 34 of file roxml_nav.c.
parent getter function
This function returns the parent of a given node
n | is one node of the tree |
Definition at line 45 of file roxml_nav.c.
prev sibling getter function
This function returns the prev sibling of a given node
n | is one node of the tree |
Definition at line 14 of file roxml_nav.c.
root getter function
This function returns the root of a tree containing the given node The root is defined as a virtual node that contains all first rank nodes if document is not a valid xml document:
<data1> <item/> <item/> </data1> <data2> <item/> <item/> </data2>
will be processed successfully and the root node will have 2 children: data1 and data2
if document was:
<?xml version="1.0"> <doc> <data1> <item/> <item/> </data1> <data2> <item/> <item/> </data2> </doc>
In this case, the node "doc" will be the root, and will contain 2 children: data1 and data2
For a document to be valid, following conditions must be met:
n | is one node of the tree |
Definition at line 55 of file roxml_nav.c.