Skip to content

Instantly share code, notes, and snippets.

@haraldmartin
Created October 3, 2010 19:33
Show Gist options
  • Save haraldmartin/608846 to your computer and use it in GitHub Desktop.
Save haraldmartin/608846 to your computer and use it in GitHub Desktop.
<?php
$filepath = dirname(__FILE__) . "your_xml_file.xml";
$contents = file_get_contents($filepath);
$elements = @new SimpleXmlElement($contents);
# do somethings with the elements
print_r($elements);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment