2008-07-04 14:17:24 UTC
Hello. I have a question about erlsom data binder mode (and probably indirectly about xml schema).
I'm trying out erlsom in the following way:
%% scan data
io:format("~p: scan~n", [Name]),
{ok, Input2, _} = erlsom:scan(Xml, SyncMLModel),
io:format("scan in: ~p~n", [Input2]),
{ok, Output2} = erlsom:write(Input2, SyncMLModel),
io:format("scan out: ~p~n", [Output2]),
%% check equality
{ok, Input2, _} = erlsom:scan(Output2, SyncMLModel),
I'm interested a feature such that if conversion of an xml complex type (see below) fails that the corresponding value of the erlang record field can contain the raw xml in binary format rather than being left as undefined.
<xs:complexType mixed="true" name="Data">
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</xs:sequence>
</xs:complexType>
Is this type of behavior possible?
thanks,