1%%[
2 var @xml, @subject, @tempxml
3 var @passengers, @passengers_rows, @passenger_count, @passenger_rows
4 var @first_name, @middle_name, @last_name, @account_number, @ticket_number
5 var @confirmation_date, @confirmation_number
6 var @flights, @flights_rows, @flight_count, @flight_rows, @flight_xml, @flight_date, @flight_number
7 var @depart_time, @depart_airport, @arrive_time, @arrive_airport, @stops
8 var @trip_price, @taxes, @trip_flex, @seat_selections, @bag_fees, @total_cost
9 var @line_bgcolor
10 set @line_bgcolor = "#cbdadf"
11 set @xml = confirmation_xml
12 set @subject = Field(Row(BuildRowSetFromXML(@xml, "/confirmation/subject"), 1), 'value')
13 set @passengers = BuildRowSetFromXML(@xml, "/confirmation/passengers")
14 set @tempxml = concat("<root>", Field(Row(@passengers, 1), "xml"), "</root>")
15 set @passengers_rows = BuildRowSetFromXML(@tempxml, "//passenger")
16 set @passenger_count = RowCount(@passengers_rows)
17 set @confirmation_date = Format(Field(Row(BuildRowSetFromXML(@xml, "/confirmation/confirmation_date"), 1), 'value'), "MMMM d, yyyy")
18 set @confirmation_number = Field(Row(BuildRowSetFromXML(@xml, "/confirmation/confirmation_number"), 1), 'value')
19 set @flights = BuildRowSetFromXML(@xml, "/confirmation/flights")
20 set @tempxml = concat("<root>", Field(Row(@flights, 1), "xml"), "</root>")
21 set @flights_rows = BuildRowSetFromXML(@tempxml, "//flight")
22 set @flight_count = RowCount(@flights_rows)
23 set @trip_price = Format(Field(Row(BuildRowsetFromXml(@xml, "/confirmation/trip_price"), 1), "Value"), "$#,#.00;-$#,#.00")
24 set @taxes = Format(Field(Row(BuildRowsetFromXml(@xml, "/confirmation/taxes"), 1), "Value"), "$#,#.00;-$#,#.00")
25 set @trip_flex = Format(Field(Row(BuildRowsetFromXml(@xml, "/confirmation/trip_flex"), 1), "Value"), "$#,#.00;-$#,#.00")
26 set @seat_selections = Format(Field(Row(BuildRowsetFromXml(@xml, "/confirmation/seat_selections"), 1), "Value"), "$#,#.00;-$#,#.00")
27 set @bag_fees = Format(Field(Row(BuildRowsetFromXml(@xml, "/confirmation/bag_fees"), 1), "Value"), "$#,#.00;-$#,#.00")
28 set @total_cost = Format(Field(Row(BuildRowsetFromXml(@xml, "/confirmation/total_cost"), 1), "Value"), "$#,#.00;-$#,#.00")
29]%%