CS::DocSystem Namespace Reference
Document system / XML helper classes. More...
Classes | |
struct | NodeAttributeCompare |
Node comparator. More... | |
struct | NodeAttributeRegexpTest |
Check if a regular expression matches(case-insensitive) with the value of the given attribute. More... | |
struct | NodeAttributeValueTest |
Compare (case-sensitive) node attribute to given. More... | |
struct | NodeNameCompare |
Node comparator. More... | |
struct | NodeValueTest |
Compare (case-sensitive) node value to given. More... | |
Functions | |
void | CloneAttributes (iDocumentNode *from, iDocumentNode *to) |
Copy the attributes of a node to another node. | |
void | CloneNode (iDocumentNode *from, iDocumentNode *to) |
Recursively clone a node with all its attributes and child-nodes. | |
template<class T > | |
csPtr< iDocumentNodeIterator > | FilterDocumentNodeIterator (csRef< iDocumentNodeIterator > parent, T filter) |
Get a filtering iDocumentNodeIterator. | |
csString | FlattenNode (iDocumentNode *node) |
"Flatten" a document node structure into a string, suitable for e.g. | |
template<class T > | |
void | RemoveDuplicateChildren (iDocumentNode *rootNode, csRef< iDocumentNodeIterator > childIt, T eq) |
Remove duplicate child-nodes. | |
template<class T > | |
void | RemoveDuplicateChildren (iDocumentNode *rootNode, T eq) |
Remove duplicate child-nodes. |
Detailed Description
Document system / XML helper classes.
Function Documentation
void CS::DocSystem::CloneAttributes | ( | iDocumentNode * | from, | |
iDocumentNode * | to | |||
) | [inline] |
Copy the attributes of a node to another node.
- Parameters:
-
from Source node to Destination node
Definition at line 181 of file documenthelper.h.
void CS::DocSystem::CloneNode | ( | iDocumentNode * | from, | |
iDocumentNode * | to | |||
) | [inline] |
Recursively clone a node with all its attributes and child-nodes.
- Parameters:
-
from Source root node to Destination root node
Definition at line 196 of file documenthelper.h.
csPtr<iDocumentNodeIterator> CS::DocSystem::FilterDocumentNodeIterator | ( | csRef< iDocumentNodeIterator > | parent, | |
T | filter | |||
) | [inline] |
Get a filtering iDocumentNodeIterator.
Only nodes matching the filter are returned. Example usage:
DocumentHelper::NodeAttributeValueTest test ("name", "Marten"); csRef<iDocumentNodeIterator> it = FilterDocumentNodeIterator (node->GetNodes(), test); while (it->HasNext ()) { ... }
Definition at line 347 of file documenthelper.h.
csString CS::DocSystem::FlattenNode | ( | iDocumentNode * | node | ) |
"Flatten" a document node structure into a string, suitable for e.g.
hashing.
void CS::DocSystem::RemoveDuplicateChildren | ( | iDocumentNode * | rootNode, | |
csRef< iDocumentNodeIterator > | childIt, | |||
T | eq | |||
) | [inline] |
Remove duplicate child-nodes.
The functor T is used to determine what should be seen as equal nodes. This is potentially an O(n^2) operation!
Definition at line 128 of file documenthelper.h.
void CS::DocSystem::RemoveDuplicateChildren | ( | iDocumentNode * | rootNode, | |
T | eq | |||
) | [inline] |
Remove duplicate child-nodes.
The functor T is used to determine what should be seen as equal nodes. This is potentially an O(n^2) operation!
Definition at line 115 of file documenthelper.h.
Generated for Crystal Space 1.4.0 by doxygen 1.5.8