[libxml++] [ libxmlplusplus-Patches-810606 ] Element::add_comment()
- From: "SourceForge.net" <noreply sourceforge net>
- To: noreply sourceforge net
- Subject: [libxml++] [ libxmlplusplus-Patches-810606 ] Element::add_comment()
- Date: Mon, 22 Sep 2003 06:44:52 -0700
Patches item #810606, was opened at 2003-09-22 13:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=312999&aid=810606&group_id=12999
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Dan Dennedy (ddennedy)
Assigned to: Nobody/Anonymous (nobody)
Summary: Element::add_comment()
Initial Comment:
Index: libxml++/nodes/element.cc
===================================================================
RCS file:
/cvsroot/libxmlplusplus/libxml++/libxml++/nodes/element.cc,v
retrieving revision 1.13
diff -u -p -r1.13 element.cc
--- libxml++/nodes/element.cc 19 Sep 2003 07:29:59
-0000 1.13
+++ libxml++/nodes/element.cc 22 Sep 2003 13:42:10 -0000
@@ -167,6 +167,16 @@ std::string
Element::get_namespace_uri_f
}
+CommentNode* Element::add_comment(const std::string&
content)
+{
+ if(cobj()->type == XML_ELEMENT_NODE)
+ {
+ xmlNode* node =
xmlNewComment((xmlChar*)content.c_str());
+ xmlAddChild(cobj(), node);
+ return static_cast<CommentNode*>(node->_private);
+ }
+ return 0;
+}
} //namespace xmlpp
Index: libxml++/nodes/element.h
===================================================================
RCS file:
/cvsroot/libxmlplusplus/libxml++/libxml++/nodes/element.h,v
retrieving revision 1.12
diff -u -p -r1.12 element.h
--- libxml++/nodes/element.h 19 Sep 2003 07:29:59
-0000 1.12
+++ libxml++/nodes/element.h 22 Sep 2003 13:42:10 -0000
@@ -67,6 +67,8 @@ public:
void set_child_content(const std::string& content);
bool has_content() const;
+ CommentNode* add_comment(const std::string& content);
+
protected:
std::string get_namespace_uri_for_prefix(const
std::string& ns_prefix) const;
};
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=312999&aid=810606&group_id=12999
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]