xmerl and $'

Tim Fletcher mail@REDACTED
Tue May 25 00:02:13 CEST 2010


> Huh? In my actual application, I've got lots of values being
> returned in a single document -- I want to preserve these values,
> not concatenate them altogether.

It looks like you want to extract the content of each 'Key' element as
a single string, in which case you need to concatenate the values of
the text/content nodes within each element. Like this:

  [lists:concat([Value || #xmlText{value=Value} <- Content]) ||
#xmlElement{content=Content} <- xmerl_xpath:string("//Key", Doc)].

Make sense?

Tim


More information about the erlang-questions mailing list