Reputation: 5761
For the life of me, I cannot find any information how to use SimpleXML to parse with special characters.
I have some XML I am trying to parse, but PHP obviously doesn't like it:
<?xml version="1.0" encoding="UTF-8"?>
<calendar-multiget xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav">
<D:prop>
<D:getetag/>
<calendar-data/>
</D:prop>
<D:href>/davical/caldav.php/rwr26/home/c9bfc6b0-064e-4316-83fe-753db34e67ee.ics</D:href>
<D:href>/davical/caldav.php/rwr26/home/4e6e3500e89673.63357057.ics</D:href>
<D:href>/davical/caldav.php/rwr26/home/4e6e42d394f9e5.08299254.ics</D:href>
</calendar-multiget>
I can't do $D:href = new SimpleXMLElement($xmlstr);
. And XPath isn't happy with that either, assuming I am doing this correctly. Can anyone point out what I am doing wrong here?
Upvotes: 1
Views: 2213