summaryrefslogtreecommitdiff
path: root/src/xml.erl
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 /src/xml.erl
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
Diffstat (limited to '')
-rw-r--r--src/xml.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xml.erl b/src/xml.erl
index 88861886..00223966 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;