diff options
author | Stef <stef@ws.local> | 2004-07-22 22:30:48 +0000 |
---|---|---|
committer | Stef <stef@ws.local> | 2004-07-22 22:30:48 +0000 |
commit | ae28df20927567f2d62b575ed4aef2d127569265 (patch) | |
tree | 81dba160573131e476cad13e8421aff07ccb5d11 /src/domhelpers.h | |
parent | f2b46a176e02637d9e8ab65433ac4bdb2dd9d8d5 (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); }; |