Intro to XML - Expedia Affiliate Network
Transcription
Intro to XML - Expedia Affiliate Network
IAN XML Technology Orientation for Affiliates What is XML? Extensible Markup Language XML or Extensible Markup Language is a universal method of transferring data so that any webpage can request and display content from an outside source when using dynamic scripting languages in your web pages. Dynamic scripting languages insert instructions into HTML tags to process XML data and display it on the page. The data is requested by user interaction with the browser and is called a request when a search button is clicked. The data is based on the requested parameters and a response is returned to the affiliate server. dschlier 2 Example Exampleprogramming programming languages languagesused usedininweb webpages: pages: ASP ASP PHP PHP JSP JSP Active ActiveServer ServerPages Pages Preprocessed PreprocessedHyptertext Hyptertext Java JavaServer ServerPages Pages What is XML? dschlier 3 Data Flow Example What is XML? Extensible Markup Language XML consists of data which is inserted between datafield tags known as elements XML data from our database is translated into extensible markup (tag-based element rather than a database field) An AnXML XMLresponse response corresponds correspondstotodata datainin the theaffiliate affiliatedownload download files found in files found inthe the Affiliate Center Affiliate Center-> -> Integration Integration-> ->Property Property Databases Databases <hotel> XML Value of the database field <hotelID>125727</hotelID> Database <name>RED LION HOTEL ON 5TH AVENUE</name> Record or <address1>1415 5TH AVENUE</address1> XML Parent <city>SEATTLE</city> Node Database field <stateProvince>WA</stateProvince> name or XML <country>US</country> element </hotel> dschlier 4 What is XML? Extensible Markup Language By giving the data a universal tag-based reference using XML, any webpage can be coded to request the data and write it to it s own page rather than linking to a Travelnow.com affiliate template page. ItItgives givesthe theaffiliate affiliate the theability abilitytotohave have all allcontent contenton onyour your own ownserver serverand and design designthe thepages pages as asyou youchoose. choose. dschlier 5 The Theaffiliate affiliatehas hasthe the ability abilitytotofully fullybrand brand your yoursite. site. The Theaffiliate affiliatehas hasfull full control controlover over monitoring monitoringyour your traffic and traffic and customizing customizingyour your application. application. What is XML? dschlier 6 Affiliate Template versus Custom Branding Affiliate Template versus Custom Branding XML Website prints out the data from the response Recall the data tree example: <hotel> <hotelID>125727</hotelID> <name>RED LION HOTEL</name> <address1>1415 5TH AVE</address1> <city>SEATTLE</city> <stateProvince>WA</stateProvince> <country>US</country> dschlier 7 What is XML? Dynamic Data XML data, delivered with website scripting languages, is called to the page and is dynamic or on the fly . The page is not written until the request or search for data is made and the data is sent back to the web page to be used as the text in the layout. The browser receives the data that is requested and uses the HTML instructions to write the XML data into the page design at that very moment. The Theweb webpage pageisisonly only aadesign template design templatefor for parsing the data each parsing the data each time timeititisisrequested requested from the source. from the source. dschlier 8 Once Oncethe thecode codeisis processed processedand anddata dataisis displayed displayedininthe the browser, it is available browser, it is available ONLY ONLYwhile whilethat thatpage pageisis being beingviewed viewedororininthe the browser history. browser history. HTML HTMLisisstatic static HTML HTMLisis hard hardcode code HTML HTMLdoes doesnot notchange change until manually altered until manually altered HTML HTMLinstructs instructsthe the browser how to display browser how to displaythe the text and design of the page text and design of the page What are Web Services? Data Transportation Web Services is another way of transporting XML data across the web. A Web Service is a library providing data or services to other applications over the Internet. A service is called by using internet protocol standards such as SOAP over HTTP. Each "service" exposes a business functionality and means of interacting with a dataset at run-time. Simple Simple Object Object Access Access Protocol (SOAP) SOAP Protocol (SOAP) - SOAP provides providesaauniversal universalway wayfor for applications to communicate applications to communicate with witheach eachother otherover overthe the Internet, independent Internet, independentofof platform. platform. dschlier 9 SOAP SOAPrelies relieson onXML XML totodefine the format define the formatofof the theinformation informationor ordata data and andthen thenadds addsthe the necessary necessaryHTTP HTTP headers to send headers to sendit.it. HyperText HyperTextTransfer Transfer Protocol (HTTP) Protocol (HTTP)- -the the underlying protocol used underlying protocol usedby by the World Wide Web. HTTP the World Wide Web. HTTP defines defineshow howmessages messagesare are formatted and transmitted, formatted and transmitted, and andwhat whatactions actionsWeb Web servers and browsers servers and browsers should shouldtake takeininresponse responsetoto various variouscommands. commands.For For example, when you enter example, when you enteraa URL URLininyour yourbrowser, browser,this this actually sends an HTTP actually sends an HTTP command commandtotothe theWeb Webserver server directing it to retrieve and directing it to retrieve and transmit transmitthe therequested requestedWeb Web page. page. What are WebServices? Object Oriented Transmissions The method of invoking a web service will depend on the programming language used. Java or .NET utilizes inherent language functionality to compile source code along with special server configurations to make the XML Web Service request and then process the results. Other methods may use SOAP directly within the document object. dschlier 10 Code Codeininany anyofofthese these languages languagesreference referencean an object object container containerthat that holds data in memory holds data in memory until untilititisiswritten writtentotothe the page. page. The Therequest requestor orresponse response can t be viewed can t be vieweddirectly directlyinin the thebrowser browserlike likethe theXML XML string string examples. examples. ItItmust must be be parsed parsedtotothe theweb web page to be seen. page to be seen. How is WebServices different from XML? Methodology Data is transmitted with server-side source code instead of within web page scripts. The request is coming from a separate source file stored on the server rather than inside the web page scripts. XML XMLisistransported transported by HTTP by HTTPas asaa string string ofofdata data defined by XML defined by XML elements. elements. dschlier 11 WebServices WebServicesare are transported as transported asaa container container ofofdata data through SOAP within through SOAP within the thesource sourcecode codeand andisis defined definedby bythe theXML XML elements. elements. IAN.com IAN.comXML XMLisis delivered deliveredby bythe the WebServices WebServiceslayer layer on the core system. on the core system. How is WebServices different from XML? Affiliate Application builds page and delivers results to user Visitor places Visitor places search on search on Affiliate Affiliate Website Website SOAP response sent back to affiliate server for processing SOAP request sent to IAN to retrieve data Travelnow.com Travelnow.comisis only onlyaccessed accessed from inside from insidethe the server serversssource source file. file. Affiliate AffiliateApplication Applicationaccesses accessesthe theserver serverss compiled compiledsource sourcefile filetotobuild buildthe therequest request The Thesource sourcefile filecontains containsspecific specificdefinition definition language (WSDL) to communicate language (WSDL) to communicatewith with the IAN WebServices program the IAN WebServices program 12 Server-side Server-side source sourcecode codeisis compiled compiled into into machine machine language. language. IAN Database Web Services request sent for data dschlier Methodology Advantages of using XML Content, Design & Marketing Control Write our product content to the affiliate s own web pages. You do not have to work within the confines of the affiliate template pages. You have more options than the use of your own headers and footers. You can organize the content and search results to fit your own merchandising, target audience, and demographics. All Allweb webpages pagesare areon onthe the affiliate affiliatessown ownserver. server. No Nopages pagesare arecalled calledfrom from Travelnow.com unless you Travelnow.com unless you choose choosetotopass passthe thecustomer customer totoany of our pages any of our pages such such as to make the booking, as to make the booking,oror use useour ourcancel cancelpage pageinstead instead ofofcreating your own. creating your own. dschlier 13 Because Becauseyou youare are handling your own handling your ownweb web pages pagesand andtraffic, traffic,you you have full control to have full control tolog log and monitor the visitor and monitor the visitorss server serveractivity activityfor foryour your own market research. own market research. Affiliates Affiliatescan caninclude includeother other types of data into your types of data into your pages pageswhich whichmay mayhelp helpsell sell our products or target your our products or target your demographics demographicsororimprove improve search engine rankings. search engine rankings. Rough RoughGuides Guidesand andRoad Road Trips Travelnow.com Trips - Travelnow.com Guest GuestReviews Reviews- -Hotels.com Hotels.com Traveler Opinions Traveler Opinions- -Expedia Expedia Advantages of using XML By using XML, affiliates create more of their own content which can be used to greater capacity with the search engines and other marketing efforts. You also have the ability to integrate other appropriate content with our data. The original/additional content will improve search engine traffic, relevancy, and alter duplicate content which therefore improves rankings. What other ways can you engage the user to build your traffic? dschlier 14 Unique Content Other OtherContent ContentExamples Examples: : including includingyour yourown ownreviews reviews travel recommendations travel recommendations things thingstotosee seeand anddo do opportunities opportunitiesfor forvisitors visitorstotoinput input their own recommendations, their own recommendations, experiences, experiences,reviews, reviews,etc. etc. Engaging Engagingthe thevisitor visitorcreates creates opportunities opportunitiesfor for: : repeat repeattraffic traffic unique uniquecontent contenttotobe beseen seenby bythe the search engines search engines user userreferrals referrals Advantages of using XML Keyword Optimization You can utilize keywords for your search engine market on each of your own pages to your best advantage. All the content appears as if it came from the affiliate and not another source. This gives you tremendous flexibility in your marketing and online presence. dschlier 15 The Thesearch searchengine engine crawler crawlerssdo donot notsee seean an affiliate template page affiliate template pageifif the theaffiliate affiliatehas hasnot not linked to one. This linked to one. This creates createsless lesschances chancesfor for exclusion exclusionininlistings. listings. Advantages of using XML Version Maintenance We maintain up to 2 versions of interface code at a time. Required changes may occur once or twice a year. At the end of the older version s cycle, this code is removed from the system and can no longer be accessed. This insures all affiliate code and data are current and creates an efficiently managed platform. The affiliate is notified by XML newsletters in advance of the upcoming schedules and you may typically have up to 6 months to complete any updates. dschlier 16 The Theaffiliate, affiliate,has hasaa convenient convenienttime timewindow windowtoto make makeany anynecessary necessary updates to work updates to workwith withthe the new version before old new version before old system systemcode codeisisremoved. removed. IfIfan anaffiliate affiliateapplication application attempts to access attempts to accessaanonnonexistent/removed version, existent/removed version, the theapplication applicationwill willnot notbe be found foundand andaccess accesserrors errors will return. will return. Who is NOT a good candidate for XML? Affiliates who do not have technical or financial resources to develop, purchase or maintain an xml website. Remember you receive our application and all programming logic for free when you use your affiliate template. When you use the data interface, all you receive is data. It is up to you to create any and all logic necessary to manage your page functions, control user input and activity, and workaround common user errors. Affiliates who do not expend time or effort on marketing, search engine optimization or market research expend a lot of time and effort for no chance of return on investment. Any affiliate can find a way to utilize data integration, however, because of the effort needed to do so, it s those who actually work their sites, have a sense of professionalism and a good understanding of the internet who will benefit the most from the time, money, and energy needed to create such a site. dschlier 17 Where can I find the XML documentation? https://www.ian.com/xmldocs/main.jsp If an affiliate has a developer, or others, who need to access the documentation to create his application but does not want others to have his affiliate account login, we have a dummy account set up for this purpose. You may use this login information in both the XML Documentation Center and the Affiliate Center. CID = 60449 User = test Pass = test dschlier 18 What s in the XML documentation? Every bit of known information that Every bit of known information that will assist the affiliate in developing will assist the affiliate in developing their application as autonomously as their application as autonomously as possible. possible. The documents are updated The documents are updated continuously as more information is continuously as more information is available or clarification becomes available or clarification becomes necessary. necessary. The Documentation outlines all The Documentation outlines all XML products along with every XML products along with every possible request parameter AND all possible request parameter AND all response data. response data. The Documentation includes The Documentation includes examples, testing procedures and examples, testing procedures and any other important notices the any other important notices the affiliate needs. affiliate needs. It is a living information center. It is a living information center. The main page of each section links to major points, announcements, notices or reminders, best practices, etc. dschlier 19 What s in the documentation? XML includes all API for processing requests and responses with an XML method for those available products hotel/condo, car, air, road trips WebServices includes all API for processing requests and responses through a WebServices method for those available products hotel/condo, car, road trips Each platform and product available through the data interface is outlined in the appropriate sections of the documentation. dschlier 20 What s in the documentation? Sample request documentation from the NEW XML Hotels By Byreviewing reviewingeach eachparameter parameter ininthe request outline, the request outline,the the affiliate is able to determine affiliate is able to determineall all methods of placing searches methods of placing searchesoror submitting submittingaareservation reservation request. request. Each Eachrequest requestisispreceded precededby by aavalid example. valid example. By Byreviewing reviewingeach eachparameter parameter ininthe response outline, the response outline,the the affiliate is able to determine affiliate is able to determineall all data returned in the response data returned in the response and anddisplay displaytotohis hisbest best advantage within the advantage within the requirements requirementsand andguidelines. guidelines. dschlier 21 Basic XML Request Example Basic XML Request string for hotel availability as created by the webpage application &intfc=ws indicates request to the NEW enhanced XML Platform The request string is buried in the scripting code where the search engines do not recognize it as an affiliate link. dschlier 22 Basic XML Full Database Record in XML Format (an XML response example) <HotelAvailabilityListResults size="1"> <Hotel> <hotelId>210687</hotelId> <name>AMARYS SIMART</name> <address1>7 RUE SIMART</address1> <address2 /> <address3 /> <city>PARIS</city> <stateProvince /> <country>FR</country> <postalCode>75018</postalCode> <airportCode>PAR</airportCode> <lowRate>98.0</lowRate> <highRate>98.0</highRate> <rateCurrencyCode>USD</rateCurrencyCode> <latitude>48.8899</latitude> <longitude>2.3488</longitude> <shortDescription> The Amarys Simart is a economy-class hotel located near the Sacré-Coeur Basilica in the 18th district of Paris. The hotel is also convenient to Place du Tertre and the northern Paris flea market.</shortDescription> <thumbNailUrl>/hotels/thumbs/PAR_AMAR-exter-1-thumb.jpg</thumbNailUrl> <supplierType>H</supplierType> <location>NEAR SACRE-COEUR BASILICA</location> <propertyRating>1.0</propertyRating> <propertyType>1</propertyType> <marketingLevel>1</marketingLevel> <hasMap>true</hasMap> <hotelInDestination>true</hotelInDestination> <referenceProximityDistance>-1.0</referenceProximityDistance> <referenceProximityUnit>MI</referenceProximityUnit> dschlier 23 - <HotelProperty> <specialRate>N</specialRate> The data in the pre<promoDescription /> defined tags <promoType /> corresponds to the <promoDetailText /> <hrnQuoteKey>UR202490401077</hrnQuoteKey> database record, as <currentAllotment>-1</currentAllotment> well as, the data seen <propertyId>PAR AMAR</propertyId> <propertyAvailable>true</propertyAvailable> on a Travelnow.com <propertyRestricted>false</propertyRestricted> results page. <roomDescription>standard triple room</roomDescription> <roomTypeCode>005</roomTypeCode> - <RateInfo> <displayCurrencyCode>USD</displayCurrencyCode> - <DisplayNightlyRates size="3"> <displayNightlyRate>98.0</displayNightlyRate> <displayNightlyRate>98.0</displayNightlyRate> <displayNightlyRate>98.0</displayNightlyRate> </DisplayNightlyRates> <displayRoomRate>317.01</displayRoomRate> <nativeCurrencyCode>USD</nativeCurrencyCode> - <NativeNightlyRates size="3"> <nativeNightlyRate>98.0</nativeNightlyRate> <nativeNightlyRate>98.0</nativeNightlyRate> <nativeNightlyRate>98.0</nativeNightlyRate> </NativeNightlyRates> <nativeRoomRate>317.01</nativeRoomRate> <rateFrequency>B</rateFrequency> </RateInfo> </HotelProperty> </Hotel> Basic XML Parsing the XML Database Response into the HTML with XSL <xsl:for-each select="HotelAvailabilityListResults/Hotel"> <xsl:choose> <xsl:when test="supplierType = ('H')"> <table > <tr"> <td> <xsl:value-of select="name"/> </td> <td> </td> Recall the data tree example: </tr> <tr> <hotel> <td> <hotelID>125727</hotelID> <img src="http://images.travelnow.com{thumbNailUrl}/> <name>RED LION HOTEL</name> </td> <address1>1415 5TH AVE</address1> <td> <city>SEATTLE</city> <xsl:value-of select="shortDescription"/> <stateProvince>WA</stateProvince> </td> <country>US</country> </tr> </hotel> </ table > <xsl:for-each select = "HotelProperty/RateInfo/DisplayNightlyRates/displayNightlyR ate"> < table > <tr><!--Show Rate--> <td> $ <xsl:value-of select="format-number(., '#.00')"/> </td> </tr> </ table > </ xsl:for-each > dschlier 24 There are a few ways to parse the data to the page but the most common is by using Extensible Style Language (XSL) which introduces the xml data into the html display instructions. Here is a sample of parsing the data with XSL to display the Hotel Availability to the page. XML is dynamic data XML is updated from the source each time accessed XML data is written to a webpage template file each time it is accessed XML uses another programming language to parse the data into html format WebServices Request ASP.NET Example Code <%@ Page Language="VB" Debug="true" %> <script runat=server language="VB"> Sub Page_Load(o As Object, e As EventArgs) refer to the server source file for all the code behind activity Dim service As New tnow.webservices.HotelFunctions Dim getList As New tnow.webservices.CityAvailabilityRequest Dim listResponse As tnow.webservices.CityAvailabilityResult getList.cid=1 getList.city="Denver" getList.stateProvince = "CO" getList.country = "US" getList.numberOfAdults=1 getList.arrivalDate = = "11/08/2004" getList.departureDate = "11/09/2004" getList.numberOfResults = 1 Try listResponse = service.getCityAvailability(getList) Catch ex As Exception Response.Write(ex.Message & " <br>") End Try container holding the request information container holding the response information REQUEST interacting with the server s source file parsing the data RESPONSE to the page from the container objects Response.write Response.write Response.write Response.write Response.write Response.write End Sub </script> dschlier 25 (listResponse.propertyList(0).hotel.name) (listResponse.propertyList(0).hotel.address1) ( <br> ") (listResponse.propertyList(0).hotel.city) (", ") (listResponse.propertyList(0).hotel.stateProvince) Datafield name Data is still designed on the page with HTML instructions even though the table isn t outlined here. The response is still returned with an XML format but is handled differently by a Web Services implementation. Is there an archive of XML Newsletters and System Notices? With the archive of Newsletters, System Notices, and Updates found in the Site Map, you can always refer back to circulated publications and the date it was announced. dschlier 26 Where do I sign up for XML Access? On the homepage, find the Section pointing to Managing Your XML Access. This section provides links to all pages for maintaining the affiliate s access. dschlier 27 Follow the navigational path How do you sign up for XML? Accounts that request access through the XML application form are now automatically validated with XML contract language so that no additional paperwork or additonal legal approval is required. The online contract acts as a digital signature and validates that you agree to all legal terms of use. Any negotiated contracts you re working on will supersede any online contracts once completed. Here is a direct link that can be used to apply for XML access with immediate contract language. http://12.14.173.100/xmldocs/xmlAccessForm.asp dschlier 28 What things are not allowed? Non-exclusivity Google or competitor type ads Meta Search Price comparison Spyware Database or XML request scanning procedures dschlier 29 XML Access is for Active CIDs only 1 The partner must fill out the XML application which includes info we need to activate your account. Missing info delays your activation. http://12.14.173.100/xmldocs/xmlAccessForm.asp 2 The application includes minimum required info to set up access: pre-approved agreement to XML language while we re waiting for a negotiated contract to be completed Your own CID IP addresses of your requesting server Used to authenticate access with your CID Specific XML Products you want activated (hotels, car, air, road trips) Additional info that helps us manage your access URL where XML is expected once the API is completed Used for site reviews and audits Email addresses who should receive any critical XML notices or update messages Insures you know when updates are needed to your API and alerts you to scheduled downtime Phone number we can use to contact you in the event of a problem dschlier 30 What is the Approval to Go Live? Once you have completed your program and is ready to go live it is crucial that we review the site for live approval against our Mandatory Requirements Checklist. https://www.ian.com/xmldocs/checklist/checkListHome.shtml The review process verifies any required/legal items are present throughout all pricing and text is accurate insures the site returns a test booking verify the test booking and confirmation text for accuracy against supplier charges We compare the affiliate results to the same search results on Travelnow.com These guidelines are there to protect partners in the event of any customer disputes and chargebacks by the hotel when proper pricing is not displayed or policies are not properly informed. It is in your best interest to collaborate with us in the final step. Apply for live approval: http://www.ian.com/xmldocs/requestReview.shtml dschlier 31 Approved Example Sites NewYorkCity.com undercovertourist.com orlando.com hotel.us deutsch.hotels.com espana.hotels.com hotel.it ireland.hotels.com hotels.dk hotell.com emea.hotels.com deals.hotels.com dschlier 32 Here s a summary list of resource links for Managing Your XML : xml@ian.com 1. Documentation: http://www.ian.com/xmldocs/main.jsp 2. Apply for Access: http://12.14.173.100/xmldocs/xmlAccessForm.asp 3. Mandatory Requirements Checklist: http://www.ian.com/xmldocs/checklist/checkListHome.shtml 4. Apply for Approval to Go Live: http://www.ian.com/xmldocs/requestReview.shtml 5. When you need to update your IP address: http://www.ian.com/xmldocs/updateIp.shtml 6. When you need to update your XML distribution email addresses: http://www.ian.com/xmldocs/updateEmail.shtml 7. Sign up for Trip Advisor guest reviews: https://www.ian.com/xmldocs/guestReviews/guestReviews.shtml dschlier 33 469-335-1106 Affiliate Relations EAN :: Expedia Affiliate Network 333 108th Ave NE Bellevue, WA :: 98004 ian.com :: hotels.com 10440 N. Central Expressway Suite 400 Dallas, TX :: 75231 This document was created with Win2PDF available at http://www.daneprairie.com. The unregistered version of Win2PDF is for evaluation or non-commercial use only.