From 9f48fe49c3b5dbc70b5c98e372cb217ea01fd98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Tue, 5 Jun 2007 01:50:28 +0000 Subject: * src/xml.erl: Add new helper function get_subtag_cdata/2. SVN Revision: 778 --- src/xml.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3