Last active
October 29, 2015 08:50
-
-
Save l3l0/848f11be090e3c3444a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $xmlString = <<<XML | |
| <ul> | |
| <li class="applicationDate"> | |
| <strong>Data aplikacji: </strong> | |
| " | |
| 19/10/15 | |
| " | |
| </li> | |
| <li class="applicationDate"> | |
| <strong>Data aplikacji: </strong> | |
| " | |
| 20/10/15 | |
| " | |
| </li> | |
| </ul> | |
| XML; | |
| $xml = simplexml_load_string($xmlString); | |
| $nodes = $xml->xpath('//li[contains(concat(" ", normalize-space(@class), " "), " applicationDat | |
| e ")]'); | |
| foreach ($nodes as $node) { | |
| echo trim(str_replace(['"', ' '] , '', $node))."\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment