Skip to content

Instantly share code, notes, and snippets.

@codesnik
Created July 1, 2013 19:33
Show Gist options
  • Save codesnik/5903825 to your computer and use it in GitHub Desktop.
Save codesnik/5903825 to your computer and use it in GitHub Desktop.
SAXPath
class FlightIndex
include CompactSAXMachine
elements :groupOfFlights do
elements :flightProposal do
element :ref
element :unitQualifier
end
elements :flightDetails do
element :flightInformation do
element :operatingCarrier
element :marketingCarrier
element :flightNumber
element :dateOfArrival
element :timeOfArrival
element :dateOfDeparture
element :timeOfDeparture
element :equipmentType
elements :locationId
elements :terminal
end
elements :technicalStop do
elements :stopDetails do
element :locationId
element :firstTime
element :date
element :dateQualifier
end
end
end
end
end
class FlightRecommendation
include CompactSAXMachine
element :fareBasis
elements :ptc
elements :amount
elements :cabin
elements :rbd
elements :avlStatus
elements :traveller
elements :fare do
elements :textSubjectQualifier
elements :description
end
elements :codeShareDetails do
elements :company
elements :transportStageQualifier
end
elements :segmentFlightRef do
elements :refQualifier
elements :refNumber
end
end
class XMLResponse
include CompactSAXMachine
elements :recommendation, :class => FlightRecommendation
elements :flightIndex, :class => FlightIndex
element :error do
element :description
element :error
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment