libdom
Loading...
Searching...
No Matches
nodelist.h File Reference
#include <stdbool.h>
#include <dom/core/nodelist.h>

Go to the source code of this file.

Macros

#define dom_nodelist_equal(l1, l2)
 

Enumerations

enum  nodelist_type {
  DOM_NODELIST_CHILDREN , DOM_NODELIST_BY_NAME , DOM_NODELIST_BY_NAMESPACE , DOM_NODELIST_BY_NAME_CASELESS ,
  DOM_NODELIST_BY_NAMESPACE_CASELESS
}
 

Functions

dom_exception _dom_nodelist_create (struct dom_document *doc, nodelist_type type, struct dom_node_internal *root, dom_string *tagname, dom_string *namespace, dom_string *localname, struct dom_nodelist **list)
 
bool _dom_nodelist_match (struct dom_nodelist *list, nodelist_type type, struct dom_node_internal *root, dom_string *tagname, dom_string *namespace, dom_string *localname)
 
bool _dom_nodelist_equal (struct dom_nodelist *l1, struct dom_nodelist *l2)
 

Macro Definition Documentation

◆ dom_nodelist_equal

#define dom_nodelist_equal ( l1,
l2 )
Value:
(struct dom_nodelist *) (l1), (struct dom_nodelist *) (l2))
bool _dom_nodelist_equal(struct dom_nodelist *l1, struct dom_nodelist *l2)
Definition nodelist.c:453
Definition nodelist.c:26

Enumeration Type Documentation

◆ nodelist_type

The NodeList type

Enumerator
DOM_NODELIST_CHILDREN 
DOM_NODELIST_BY_NAME 
DOM_NODELIST_BY_NAMESPACE 
DOM_NODELIST_BY_NAME_CASELESS 
DOM_NODELIST_BY_NAMESPACE_CASELESS 

Function Documentation

◆ _dom_nodelist_create()

dom_exception _dom_nodelist_create ( dom_document * doc,
nodelist_type type,
dom_node_internal * root,
dom_string * tagname,
dom_string * namespace,
dom_string * localname,
dom_nodelist ** list )

Create a nodelist

Parameters
docOwning document
typeThe type of the NodeList
rootRoot node of subtree that list applies to
tagnameName of nodes in list (or NULL)
namespaceNamespace part of nodes in list (or NULL)
localnameLocal part of nodes in list (or NULL)
listPointer to location to receive list
Returns
DOM_NO_ERR on success, DOM_NO_MEM_ERR on memory exhaustion

::root must be a node owned by ::doc

The returned list will already be referenced, so the client need not do so explicitly. The client must unref the list once finished with it.

◆ _dom_nodelist_equal()

bool _dom_nodelist_equal ( dom_nodelist * l1,
dom_nodelist * l2 )

Test whether the two NodeList are equal

Parameters
l1One list
l2The other list \reutrn true for equal, false otherwise.

◆ _dom_nodelist_match()

bool _dom_nodelist_match ( dom_nodelist * list,
nodelist_type type,
dom_node_internal * root,
dom_string * tagname,
dom_string * namespace,
dom_string * localname )

Match a nodelist instance against a set of nodelist creation parameters

Parameters
listList to match
typeThe type of the NodeList
rootRoot node of subtree that list applies to
tagnameName of nodes in list (or NULL)
namespaceNamespace part of nodes in list (or NULL)
localnameLocal part of nodes in list (or NULL)
Returns
true if list matches, false otherwise