|
|||||||
New to SitePoint Forums? Register here for free!
|
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Zealot
![]() ![]() Join Date: Aug 2005
Location: South Africa
Posts: 185
|
Creating a DataObject from an XML file
Hi
I have the following XML file that contains a list of HotelDescriptiveContent nodes. I would like to create a DataObject from the XML file. Please assist and see if I am approaching this correctly. Be gentle ;-) HTML Code:
<?xml version="1.0" encoding="UTF-8"?> <OTA_HotelDescriptiveInfoRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 http://localhost:8080/APIWebModule/FS_OTA_HotelDescriptiveInfoRS.xsd" Version="1.1"> <Success/> <HotelDescriptiveContents> <HotelDescriptiveContent HotelCode="ABC" HotelName="ABC Hotel" BrandName="ABC Brand" LanguageCode=""> <HotelInfo> <Descriptions> <Description InfoCode="1"> <Text>This is a very beautiful hotel</Text> <Image>http://localhost/images/properties/ABC/ABC.jpg</Image> </Description> <Description InfoCode="3"> <Text>This is a beautiful hotel</Text> </Description> </Descriptions> </HotelInfo> <FacilityInfo LastUpdated="2005-05-01T12:00:00"> <GuestRooms> <GuestRoom Code="B1K" RoomTypeName="Room type name" CodeContext="AB1" MaxOccupancy="10" MaxAdultOccupancy="5" NonsmokingQuantity="0" > <TypeRoom Name="Category name"/> <Description> <Text>This is a beautiful room with a view</Text> <Image>http://localhost/images/properties/ABC/roomtypes/B1K.jpg</Image> </Description> </GuestRoom> <GuestRoom Code="S1K" RoomTypeName="Room type name" > <Description> <Text>This is another beautiful room with a view</Text> <Image>http://localhost/images/properties/ABC/roomtypes/S1K.jpg</Image> </Description> </GuestRoom> </GuestRooms> </FacilityInfo> <AffiliationInfo LastUpdated="2005-05-01T12:00:00"> <Awards> <Award Rating="5*" /> </Awards> </AffiliationInfo> <MultimediaObjects LastUpdated="2005-05-01T12:00:00"> <MultimediaObject Version="" ContentTitle="" ContentCode="6" ContentData=""> <Image>http://localhost/images/properties/ABC/Map.jpg</Image> </MultimediaObject> </MultimediaObjects> <ContactInfos> <ContactInfo> <Addresses> <Address Type="7"> <AddressLine>11A De La Rey Rood</AddressLine> <AddressLine>Montwood House</AddressLine> <CityName>Rivonia</CityName> <PostalCode>2128</PostalCode> <County>JHB South</County> <StateProv>Gauteng</StateProv> <CountryName>South Africa</CountryName> </Address> <Address Type="2"> <AddressLine>PO Box 12345</AddressLine> <AddressLine>Rivonia</AddressLine> <PostalCode>2128</PostalCode> </Address> </Addresses> <Phones> <Phone PhoneTechType="1" PhoneNumber="0118032208"/> <Phone PhoneTechType="3" PhoneNumber="0118071901"/> </Phones> <Emails> <Email>koos@property.com</Email> </Emails> <URLs> <URL>www.property.com</URL> </URLs> </ContactInfo> </ContactInfos> <TPA_Extensions> <HotelLocation> <Text>This is the location of the hotel</Text> </HotelLocation> </TPA_Extensions> </HotelDescriptiveContent> </HotelDescriptiveContents> </OTA_HotelDescriptiveInfoRS> PHP Code:
PHP Code:
Many thanks -- lv |
|
|
|
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 02:41.









Threaded Mode