aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickaël Rémond <mickael.remond@process-one.net>2007-06-05 01:50:28 +0000
committerMickaël Rémond <mickael.remond@process-one.net>2007-06-05 01:50:28 +0000
commit9f48fe49c3b5dbc70b5c98e372cb217ea01fd98b (patch)
tree555b58f19a2147a74291ffaf0b46cbf1508e36e2
parent* src/mod_vcard_odbc.erl: Fix for previous commit (thanks to (diff)
* src/xml.erl: Add new helper function get_subtag_cdata/2.
SVN Revision: 778
-rw-r--r--ChangeLog4
-rw-r--r--src/xml.erl9
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7055110db..ac79ca6f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-05 Mickael Remond <mickael.remond@process-one.net>
+
+ * src/xml.erl: Add new helper function get_subtag_cdata/2.
+
2007-05-31 Alexey Shchepin <alexey@sevcom.net>
* src/mod_vcard_odbc.erl: Fix for previous commit (thanks to
diff --git a/src/xml.erl b/src/xml.erl
index 888618867..002239668 100644
--- a/src/xml.erl
+++ b/src/xml.erl
@@ -16,7 +16,7 @@
get_cdata/1, get_tag_cdata/1,
get_attr/2, get_attr_s/2,
get_tag_attr/2, get_tag_attr_s/2,
- get_subtag/2,
+ get_subtag/2, get_subtag_cdata/2,
get_path_s/2,
replace_tag_attr/3]).
@@ -209,6 +209,13 @@ get_subtag1([El | Els], Name) ->
get_subtag1([], _) ->
false.
+get_subtag_cdata(Tag, Name) ->
+ case get_subtag(Tag, Name) of
+ false ->
+ "";
+ Subtag ->
+ get_tag_cdata(Subtag)
+ end.
get_path_s(El, []) ->
El;