Skip to content

Instantly share code, notes, and snippets.

@brweber2
Last active March 29, 2016 14:51
Show Gist options
  • Save brweber2/095257067d929c4de206 to your computer and use it in GitHub Desktop.
Save brweber2/095257067d929c4de206 to your computer and use it in GitHub Desktop.
# this is using sweet_xml
xml_string = File.read!("some_file.xml")
try do
Logger.info(self()) # it does not work without this ... wat?
{:ok, xml} = Parser.parse(xml_string)
process_xml(conn, xml_string, xml)
rescue
e ->
Logger.info("ignoring unparseable XML file: #{inspect xml_string}")
render(conn, "empty.json")
end
# when the "magic" line is commented out...
[error] 2544- fatal: {:endtag_does_not_match,
{:was, :Birthdate, :should_have_been, :BirthdateMessedUp}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment