diff options
author | Stef Walter <stef@memberwebs.com> | 2004-07-22 22:30:48 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-07-22 22:30:48 +0000 |
commit | 879f4addd4c94492c21c36c0be98122a879907bf (patch) | |
tree | 81dba160573131e476cad13e8421aff07ccb5d11 /src/domhelpers.h | |
parent | 7c93b2bab50b1ee28aee190a064b11daed247d83 (diff) |
- Comments and formatting changes.
Diffstat (limited to 'src/domhelpers.h')
-rw-r--r-- | src/domhelpers.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/domhelpers.h b/src/domhelpers.h index 16afd79..043ffd4 100644 --- a/src/domhelpers.h +++ b/src/domhelpers.h @@ -41,16 +41,32 @@ #include "sablo.h" +/* + * DOMHelpers + * + * A collection of functions for doing some things with an XML DOM. + * Used mainly by XMLComposer. + */ class DOMHelpers { public: - // DOM Helper Functions + // Check if given node is an element with a certain name static bool isElement(const DOM::Node& node, const string& name); + + // Check if two elements have the same name and attributes static bool isEqualElement(const DOM::Element& el1, const DOM::Element& el2); + + // Copy attributes from one element to another optionaly ignoring some static void copyAttributes(const DOM::Element& src, DOM::Element& dest, const char** hideList); + + // Insert a child node after a given reference node static void insertAfter(DOM::Node& parent, const DOM::Node& node, const DOM::Node& ref); + + // Get containing element of a given name static DOM::Element getContainingElement(const DOM::Node& node, const string& name); + + // Get previous element (in XML flow) of a given name static DOM::Element getPriorElement(const DOM::Node& node, const string& name); }; |