Skip to content

Instantly share code, notes, and snippets.

@SynCap
Last active July 11, 2021 11:26
Show Gist options
  • Save SynCap/391877fa398e946b1172ce9817a2fb22 to your computer and use it in GitHub Desktop.
Save SynCap/391877fa398e946b1172ce9817a2fb22 to your computer and use it in GitHub Desktop.
parseXML, JavaScript
const parseXML = str => {try{ return (new window.DOMParser()).parseFromString(str, "text/xml") } catch(e) { return undefined} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment