Jump to content

XML Parsing Help


christo16

Recommended Posts

Hello,

I need some help parsing this XML file.  The only data that I want to extract is he calendar-data section.  I've tried some different things and the best I've been able to do is output the Keys but not that data within the keys.

<?xml version='1.0' encoding='UTF-8'?>
<multistatus xmlns='DAV:'>
  <response>
<href>/calendars/users/XXXXX/calendar/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX.ics</href>
<propstat>
  <prop>
	<getetag>\"93abc877951916fd12ab228f5a34e569\"</getetag>
	<calendar-data xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[bEGIN:VCALENDAR
VERSION:2.0
PRODID:-//PYVOBJECT//NONSGML Version 1//EN
BEGIN:VTIMEZONE
TZID:US/Pacific
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX
DTSTART;TZID=US/Pacific:20080501T130000
DTEND;TZID=US/Pacific:20080501T135000
EXDATE;TZID=US/Pacific:20080529T130000
RRULE:FREQ=WEEKLY;INTERVAL=2
SUMMARY:Staff Meeting
END:VEVENT
BEGIN:VEVENT
UID:CD01072C-A77F-411A-8343-70AC2B293957
RECURRENCE-ID;TZID=US/Pacific:20080501T130000
DTSTART;TZID=US/Pacific:20080501T130000
DTEND;TZID=US/Pacific:20080501T135000
SUMMARY:Staff Meeting
END:VEVENT
END:VCALENDAR
]]></calendar-data>
  </prop>
  <status>HTTP/1.1 200 OK</status>
</propstat>
  </response>
</multistatus>

 

Thank you!

Link to comment
https://forums.phpfreaks.com/topic/108880-xml-parsing-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.