Permalink
Browse files

*** empty log message ***

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@878 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent 16299b3 commit 5ef2b8a4a1b4f0c1f5627f014f291b4b14704253 Tobbe Tornquist committed May 16, 2005
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/yaws_dav.erl
View
@@ -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}]).
@@ -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.

0 comments on commit 5ef2b8a

Please sign in to comment.