1 defmodule Pleroma.Web.XML do
4 def string_from_xpath(_, :error), do: nil
5 def string_from_xpath(xpath, doc) do
6 {:xmlObj, :string, res} = :xmerl_xpath.string('string(#{xpath})', doc)
12 if res == "", do: nil, else: res
15 def parse_document(text) do
18 |> :binary.bin_to_list
24 Logger.debug("Couldn't parse xml: #{inspect(text)}")