From ae28df20927567f2d62b575ed4aef2d127569265 Mon Sep 17 00:00:00 2001 From: Stef Date: Thu, 22 Jul 2004 22:30:48 +0000 Subject: - Comments and formatting changes. --- src/domhelpers.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/domhelpers.h') 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); }; -- cgit v1.2.3