Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@878 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
Tobbe Tornquist committed May 16, 2005
1 parent 16299b3 commit 5ef2b8a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/yaws_dav.erl
Expand Up @@ -3,17 +3,21 @@
%%% Created : 15 May 2005 by Tobbet <tobbe@tornkvist.org>
%%% Desc. : WebDav specifics.
%%%-------------------------------------------------------------------
-export([parse_xml/1, xml_expand/1]).
-export([parse_xml/1, xml_expand/1, xml_expand/2]).

-include("yaws_dav.hrl").
-include("xmerl.hrl").

-include_lib("yaws/include/yaws_dav.hrl").
-include_lib("xmerl/include/xmerl.hrl").

-define(elog(X,Y), error_logger:info_msg("*elog ~p:~p: " X,
[?MODULE, ?LINE | Y])).


xml_expand(L) ->
Prolog = ["<?xml version=\"1.0\" encoding=\"utf-8\" ?>"],
xml_expand(L, "utf-8").

xml_expand(L, Cset) ->
Prolog = ["<?xml version=\"1.0\" encoding=\""++Cset++"\" ?>"],
xmerl:export_simple(L,xmerl_xml,[{prolog,Prolog}]).


Expand All @@ -23,6 +27,7 @@ parse_xml(L) when list(L) ->
{X,_} when record(X, xmlElement) ->
parse_dav(X);
_Z ->
?elog("to_xml: error ~p~n", [_Z]),
{error, "xml scanner failed"}
end.

Expand Down

0 comments on commit 5ef2b8a

Please sign in to comment.