typedef struct _xmlLink | xmlLink |
typedef xmlLink * | xmlLinkPtr |
typedef struct _xmlList | xmlList |
typedef xmlList * | xmlListPtr |
typedef void(* | xmlListDeallocator |
xmlListDeallocator: Callback function used to free data from a list.
typedef int(* | xmlListDataCompare |
xmlListDataCompare: Callback function used to compare 2 data.
Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
typedef int(* | xmlListWalker |
xmlListWalker: Callback function used when walking a list with xmlListWalk().
Returns 0 to stop walking the list, 1 otherwise.
XMLPUBFUN xmlListPtr XMLCALL | xmlListCreate | ( | xmlListDeallocator | deallocator, |
xmlListDataCompare | compare | |||
) |
xmlListCreate: Create a new list
Returns the new list or NULL in case of error
Parameters | |
---|---|
deallocator | an optional deallocator function |
compare | an optional comparison function |
XMLPUBFUN void XMLCALL | xmlListDelete | ( | xmlListPtr | l | ) |
xmlListDelete: Deletes the list and its associated data
Parameters | |
---|---|
l | a list |
XMLPUBFUN int XMLCALL | xmlListInsert | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListInsert: Insert data in the ordered list at the beginning for this value
Returns 0 in case of success, 1 in case of failure
Parameters | |
---|---|
l | a list |
data | the data |
XMLPUBFUN int XMLCALL | xmlListAppend | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListAppend: Insert data in the ordered list at the end for this value
Returns 0 in case of success, 1 in case of failure
Parameters | |
---|---|
l | a list |
data | the data |
XMLPUBFUN int XMLCALL | xmlListRemoveFirst | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListRemoveFirst: Remove the first instance associated to data in the list
Returns 1 if a deallocation occured, or 0 if not found
Parameters | |
---|---|
l | a list |
data | list data |
XMLPUBFUN void XMLCALL | xmlListClear | ( | xmlListPtr | l | ) |
xmlListClear: Remove the all data in the list
Parameters | |
---|---|
l | a list |
XMLPUBFUN int XMLCALL | xmlListEmpty | ( | xmlListPtr | l | ) |
xmlListEmpty: Is the list empty ?
Returns 1 if the list is empty, 0 otherwise
Parameters | |
---|---|
l | a list |
XMLPUBFUN xmlLinkPtr XMLCALL | xmlListFront | ( | xmlListPtr | l | ) |
xmlListFront: Get the first element in the list
Returns the first element in the list, or NULL
Parameters | |
---|---|
l | a list |
XMLPUBFUN xmlLinkPtr XMLCALL | xmlListEnd | ( | xmlListPtr | l | ) |
xmlListEnd: Get the last element in the list
Returns the last element in the list, or NULL
Parameters | |
---|---|
l | a list |
XMLPUBFUN void XMLCALL | xmlListReverse | ( | xmlListPtr | l | ) |
xmlListReverse: Reverse the order of the elements in the list
Parameters | |
---|---|
l | a list |
XMLPUBFUN void XMLCALL | xmlListPopBack | ( | xmlListPtr | l | ) |
xmlListPopBack: Removes the last element in the list
Parameters | |
---|---|
l | a list |
XMLPUBFUN void XMLCALL | xmlListSort | ( | xmlListPtr | l | ) |
xmlListSort: Sort all the elements in the list
Parameters | |
---|---|
l | a list |
XMLPUBFUN void *XMLCALL | xmlListSearch | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListSearch: Search the list for an existing value of data
Returns the value associated to data or NULL in case of error
Parameters | |
---|---|
l | a list |
data | a search value |
XMLPUBFUN void *XMLCALL | xmlListReverseSearch | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListReverseSearch: Search the list in reverse order for an existing value of data
Returns the value associated to data or NULL in case of error
Parameters | |
---|---|
l | a list |
data | a search value |
XMLPUBFUN int XMLCALL | xmlListRemoveLast | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListRemoveLast: Remove the last instance associated to data in the list
Returns 1 if a deallocation occured, or 0 if not found
Parameters | |
---|---|
l | a list |
data | list data |
XMLPUBFUN int XMLCALL | xmlListRemoveAll | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListRemoveAll: Remove the all instance associated to data in the list
Returns the number of deallocation, or 0 if not found
Parameters | |
---|---|
l | a list |
data | list data |
XMLPUBFUN int XMLCALL | xmlListPushBack | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListPushBack: add the new data at the end of the list
Returns 1 if successful, 0 otherwise
Parameters | |
---|---|
l | a list |
data | new data |
XMLPUBFUN void XMLCALL | xmlListReverseWalk | ( | xmlListPtr | l, |
xmlListWalker | walker, | |||
const void * | user | |||
) |
xmlListReverseWalk: Walk all the element of the list in reverse order and apply the walker function to it
Parameters | |
---|---|
l | a list |
walker | a processing function |
user | a user parameter passed to the walker function |
XMLPUBFUN xmlListPtr XMLCALL | xmlListDup | ( | const xmlListPtr | old | ) |
xmlListDup: Duplicate the list
Returns a new copy of the list or NULL in case of error
Parameters | |
---|---|
old | the list |
XMLPUBFUN int XMLCALL | xmlListSize | ( | xmlListPtr | l | ) |
xmlListSize: Get the number of elements in the list
Returns the number of elements in the list
Parameters | |
---|---|
l | a list |
XMLPUBFUN void XMLCALL | xmlListPopFront | ( | xmlListPtr | l | ) |
xmlListPopFront: Removes the first element in the list
Parameters | |
---|---|
l | a list |
XMLPUBFUN int XMLCALL | xmlListPushFront | ( | xmlListPtr | l, |
void * | data | |||
) |
xmlListPushFront: add the new data at the beginning of the list
Returns 1 if successful, 0 otherwise
Parameters | |
---|---|
l | a list |
data | new data |
XMLPUBFUN void XMLCALL | xmlListWalk | ( | xmlListPtr | l, |
xmlListWalker | walker, | |||
const void * | user | |||
) |
xmlListWalk: Walk all the element of the first from first to last and apply the walker function to it
Parameters | |
---|---|
l | a list |
walker | a processing function |
user | a user parameter passed to the walker function |
XMLPUBFUN void XMLCALL | xmlListMerge | ( | xmlListPtr | l1, |
xmlListPtr | l2 | |||
) |
xmlListMerge: include all the elements of the second list in the first one and clear the second list
Parameters | |
---|---|
l1 | the original list |
l2 | the new list |
XMLPUBFUN int XMLCALL | xmlListCopy | ( | xmlListPtr | cur, |
const xmlListPtr | old | |||
) |
xmlListCopy: Move all the element from the old list in the new list
Returns 0 in case of success 1 in case of error
Parameters | |
---|---|
cur | the new list |
old | the old list |
XMLPUBFUN void *XMLCALL | xmlLinkGetData | ( | xmlLinkPtr | lk | ) |
xmlLinkGetData: See Returns.
Returns a pointer to the data referenced from this link
Parameters | |
---|---|
lk | a link |