Addis Posted April 21, 2014 Share Posted April 21, 2014 (edited) need to create a webapp using a control to display each event, have difficulty with path to get the position and column attribute. any help and how do i bind a control to this data to make it an app where a use can browse through each event with there corresponding characteristics? below is the sample xml..... thanks <?php $keywords = simplexml_load_file('http://wx.toronto.ca/festevents.nsf/tpaview?readviewentries'); echo ' '; foreach ($keywords->xpath('viewentry[@position]') as $kw) { echo ' ' .$kw->entrydata->text . ' '; } //echo ' '; //foreach ($keywords->viewentry->entrydata as $kw) { //echo ' '.$kw->text.''; //echo ' '.$kw->textlist->text.''; //} ?> <?xml version="1.0" encoding="UTF-8"?> <viewentries timestamp="20140420T142611,65Z" toplevelentries="1209"> <viewentry position="1" unid="9FBAD6EEF554FC2185257CBB0063FDD0" noteid="4E072" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text> ‘Antiques Roadshow’-inspired Open Call for Canadian Art </text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <textlist> <text>Arts/Exhibits</text> <text>Seminars/Workshops</text> </textlist> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/9FBAD6EEF554FC2185257CBB0063FDD0/$File/logo_banner.png </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>9:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>5:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Have you ever wondered how much that inherited painting tucked away in the attic is worth? Consignor Canadian Fine Art’s (consignor.ca) certified art specialists are looking for hidden treasures for their upcoming auctions. Anyone interested in selling a Canadian painting, print or sculpture on consignment, receiving a preliminary auction valuation and/or curious to learn more about a piece of artwork they own, is invited to attend an art appraisal open house on Friday, May 9th. </text> <text> Consignor’s art specialists will be on-hand for mini-consultations and verbal auction valuations of works by Canadian artists, as well as preview works of art available for sale through its upcoming Spring Auction of Important Canadian Art (May 21-29). </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-628-5609</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Dundas St. W and McCaul St.</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> [<a href=http://map.toronto.ca/imapit/iMapIt.jsp?app=TOMaps&geoid=796553 target=_new>Map to this event</a>] </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.consignor.ca</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>amcloughlin@holmespr.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text/> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text/> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="2" unid="05618376115EB38B85257CB00063C61E" noteid="4D5AE" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>Tour the PS Trillium Side Wheeler Paddle Steamer</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <text>History</text> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>The Waterfont BIA</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/05618376115EB38B85257CB00063C61E/$File/Trillium Ferry.JPG </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 24, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>10:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 25, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>3:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Take a tour of the PS Trillium Side Wheleer Paddle Steamer at Gangways Open on Toronto’s Waterfront presented by The Waterfront BIA, as part of the 15th annual Doors Open Toronto. </text> <text>Visit www.waterfrontbia.com for more information.</text> <text> The PS Trillium was constructed in 1910 at Polson Iron Works in Toronto, was re-constructed in Port Colborne in 1975 and continues to operate in the rebuilt condition today. The Trillium is the last remaining side wheeler paddle steamer operating in North America and is located at the foot of Harbour Square Park at the base of Bay Street. Author/Journalist Mike Filey will be on board to answer questions when he is not speaking in the Brigantine Room. </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-603-6005</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Harbour Square Park</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Queens Quay West and Rees Street</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> No matching map link is available for the current address input. </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.waterfrontbia.com</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>peter@ashworthassociates.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text>Fully accessible</text> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text>New this year</text> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="3" unid="58B01EF4B58CFE1D85257C97007303D5" noteid="4B76E" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>10th Annual Toronto Tango Festival</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Southwest</text><?xml version="1.0" encoding="UTF-8"?> <viewentries timestamp="20140420T142611,65Z" toplevelentries="1209"> <viewentry position="1" unid="9FBAD6EEF554FC2185257CBB0063FDD0" noteid="4E072" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text> ‘Antiques Roadshow’-inspired Open Call for Canadian Art </text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <textlist> <text>Arts/Exhibits</text> <text>Seminars/Workshops</text> </textlist> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/9FBAD6EEF554FC2185257CBB0063FDD0/$File/logo_banner.png </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>9:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>5:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Have you ever wondered how much that inherited painting tucked away in the attic is worth? Consignor Canadian Fine Art’s (consignor.ca) certified art specialists are looking for hidden treasures for their upcoming auctions. Anyone interested in selling a Canadian painting, print or sculpture on consignment, receiving a preliminary auction valuation and/or curious to learn more about a piece of artwork they own, is invited to attend an art appraisal open house on Friday, May 9th. </text> <text> Consignor’s art specialists will be on-hand for mini-consultations and verbal auction valuations of works by Canadian artists, as well as preview works of art available for sale through its upcoming Spring Auction of Important Canadian Art (May 21-29). </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-628-5609</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Dundas St. W and McCaul St.</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> [<a href=http://map.toronto.ca/imapit/iMapIt.jsp?app=TOMaps&geoid=796553 target=_new>Map to this event</a>] </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.consignor.ca</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>amcloughlin@holmespr.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text/> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text/> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="2" unid="05618376115EB38B85257CB00063C61E" noteid="4D5AE" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>Tour the PS Trillium Side Wheeler Paddle Steamer</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <text>History</text> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>The Waterfont BIA</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/05618376115EB38B85257CB00063C61E/$File/Trillium Ferry.JPG </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 24, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>10:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 25, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>3:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Take a tour of the PS Trillium Side Wheleer Paddle Steamer at Gangways Open on Toronto’s Waterfront presented by The Waterfront BIA, as part of the 15th annual Doors Open Toronto. </text> <text>Visit www.waterfrontbia.com for more information.</text> <text> The PS Trillium was constructed in 1910 at Polson Iron Works in Toronto, was re-constructed in Port Colborne in 1975 and continues to operate in the rebuilt condition today. The Trillium is the last remaining side wheeler paddle steamer operating in North America and is located at the foot of Harbour Square Park at the base of Bay Street. Author/Journalist Mike Filey will be on board to answer questions when he is not speaking in the Brigantine Room. </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-603-6005</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Harbour Square Park</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Queens Quay West and Rees Street</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> No matching map link is available for the current address input. </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.waterfrontbia.com</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>peter@ashworthassociates.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text>Fully accessible</text> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text>New this year</text> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="3" unid="58B01EF4B58CFE1D85257C97007303D5" noteid="4B76E" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>10th Annual Toronto Tango Festival</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Southwest</text> Edited April 21, 2014 by Addis Quote Link to comment Share on other sites More sharing options...
mogosselin Posted April 21, 2014 Share Posted April 21, 2014 The PHP code you posted is not really formatted. Also, the XML code you posted is way too long for a forum post. If you think something that long is relevant, you can post it to an external site (like pastebin.com for example). Try to format your PHP code correctly (use the "code" feature, it's the <> icon). Also, try to explain what your code is supposed to do, It wasn't really clear (at least, for me ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.