1. 程式人生 > >利用dom4j解析xml檔案匯入MySql

利用dom4j解析xml檔案匯入MySql

#新增pom.xml的依賴架包
因為我的專案是基於Maven管理,有個父pom,所以不用新增版本號

	<dependency>
         <groupId>dom4j</groupId>
         <artifactId>dom4j</artifactId>
        </dependency>
        <dependency>
        <groupId>jaxen</groupId>
        <artifactId>jaxen</artifactId>
        </dependency>
       <!--匯入資料庫依賴架包-->
        <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
        <version>8.0.11</version>
    </dependency>

舉個例子1.xml檔案

<?xml version="1.0" encoding="UTF-8"?>
<EBUILD Airline="CA" ChannelID="CTO_PEK" ServiceName="AirAvailability" Version="1.0">
  <Header>
        <tc>
            <iden p="TEST_PWD" u="090297" pseudocity="PEK003" agy="08392053"/>
			<provider session="CA_CTO_PEK_201504141854216902" host="d"/>
        </tc>
  </Header>
  <Body>
    <RES>
      <AirAvailabilityRS>
        <OriginDestination>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>06:50</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>09:05</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>5901</FlightNumber>
              </Carrier>
              <OperatingCarrier>
                <AirlineCode>HO</AirlineCode>
                <AirlineName>HO</AirlineName>
                <FlightNumber>1252</FlightNumber>
              </OperatingCarrier>
              <Equipment>
                <Code>320</Code>
                <Name>320</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="A">B</ClassOfService>
                <ClassOfService Status="A">H</ClassOfService>
                <ClassOfService Status="A">K</ClassOfService>
                <ClassOfService Status="A">L</ClassOfService>
                <ClassOfService Status="A">Q</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>07:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>09:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1831</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>330</Code>
                <Name>330</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="3">A</ClassOfService>
                <ClassOfService Status="A">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="3">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="A">H</ClassOfService>
                <ClassOfService Status="A">K</ClassOfService>
                <ClassOfService Status="A">L</ClassOfService>
                <ClassOfService Status="A">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="2">O</ClassOfService>
                <ClassOfService Status="A">Q</ClassOfService>
                <ClassOfService Status="A">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="2">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>07:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>09:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber Suffix="A">1831</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>330</Code>
                <Name>330</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">A</ClassOfService>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">F</ClassOfService>
                <ClassOfService Status="R">G</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="R">N</ClassOfService>
                <ClassOfService Status="R">O</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>08:05</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>PVG</AirportCode>
                <AirportName>浦東機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>10:15</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1835</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>32A</Code>
                <Name>32A</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="S">A</ClassOfService>
                <ClassOfService Status="A">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="A">H</ClassOfService>
                <ClassOfService Status="A">K</ClassOfService>
                <ClassOfService Status="8">L</ClassOfService>
                <ClassOfService Status="A">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="A">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="3">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>08:05</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>11:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1125</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>73G</Code>
                <Name>73G</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">A</ClassOfService>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">F</ClassOfService>
                <ClassOfService Status="R">G</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="R">O</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>08:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>10:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber Suffix="Q">1501</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77S</Code>
                <Name>77S</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">A</ClassOfService>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">F</ClassOfService>
                <ClassOfService Status="R">G</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="R">N</ClassOfService>
                <ClassOfService Status="R">O</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">W</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>08:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>10:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1501</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77S</Code>
                <Name>77S</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="6">A</ClassOfService>
                <ClassOfService Status="A">B</ClassOfService>
                <ClassOfService Status="Q">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="Q">G</ClassOfService>
                <ClassOfService Status="A">H</ClassOfService>
                <ClassOfService Status="A">K</ClassOfService>
                <ClassOfService Status="A">L</ClassOfService>
                <ClassOfService Status="A">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="Q">Q</ClassOfService>
                <ClassOfService Status="A">S</ClassOfService>
                <ClassOfService Status="Q">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="Q">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="S">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>09:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>11:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1519</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77L</Code>
                <Name>77L</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="S">A</ClassOfService>
                <ClassOfService Status="A">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="A">H</ClassOfService>
                <ClassOfService Status="A">K</ClassOfService>
                <ClassOfService Status="3">L</ClassOfService>
                <ClassOfService Status="A">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="A">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>10:00</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>11:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>113</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>738</Code>
                <Name>738</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">C</ClassOfService>
                <ClassOfService Status="R">D</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">G</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">I</ClassOfService>
                <ClassOfService Status="R">J</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="R">N</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">R</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
                <ClassOfService Status="R">Z</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>11:00</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>13:30</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1006</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>773</Code>
                <Name>773</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">A</ClassOfService>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">C</ClassOfService>
                <ClassOfService Status="R">D</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">F</ClassOfService>
                <ClassOfService Status="R">G</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">I</ClassOfService>
                <ClassOfService Status="R">J</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="R">O</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">R</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
                <ClassOfService Status="R">Z</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>11:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>13:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1557</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>33A</Code>
                <Name>33A</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>L</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="1">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="4">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="1">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>12:00</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>14:00</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>8003</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>330</Code>
                <Name>330</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">A</ClassOfService>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="R">O</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>13:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>15:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1517</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>744</Code>
                <Name>744</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>M</Meals>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="S">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="A">C</ClassOfService>
                <ClassOfService Status="5">D</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="2">I</ClassOfService>
                <ClassOfService Status="S">J</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="2">R</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
                <ClassOfService Status="2">Z</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>14:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>16:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1521</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>773</Code>
                <Name>773</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="2">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="8">P</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="3">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>15:25</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>PVG</AirportCode>
                <AirportName>浦東機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>17:35</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>177</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>330</Code>
                <Name>330</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="Q">B</ClassOfService>
                <ClassOfService Status="A">C</ClassOfService>
                <ClassOfService Status="S">D</ClassOfService>
                <ClassOfService Status="Q">E</ClassOfService>
                <ClassOfService Status="Q">G</ClassOfService>
                <ClassOfService Status="Q">H</ClassOfService>
                <ClassOfService Status="1">I</ClassOfService>
                <ClassOfService Status="S">J</ClassOfService>
                <ClassOfService Status="Q">K</ClassOfService>
                <ClassOfService Status="Q">L</ClassOfService>
                <ClassOfService Status="Q">M1</ClassOfService>
                <ClassOfService Status="Q">N</ClassOfService>
                <ClassOfService Status="Q">Q</ClassOfService>
                <ClassOfService Status="S">R</ClassOfService>
                <ClassOfService Status="Q">S</ClassOfService>
                <ClassOfService Status="Q">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="Q">V1</ClassOfService>
                <ClassOfService Status="Q">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
                <ClassOfService Status="S">Z</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>15:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>17:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1515</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77L</Code>
                <Name>77L</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="S">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>16:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>18:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1549</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77L</Code>
                <Name>77L</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="S">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>17:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>19:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1855</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>773</Code>
                <Name>773</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>D</Meals>
              <Frequency />
              <ElectronicTicketing>N</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="2">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="4">P</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>18:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>20:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1885</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77S</Code>
                <Name>77S</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>S</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="S">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="2">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>19:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>21:55</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1857</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>77L</Code>
                <Name>77L</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>D</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="1">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="A">W</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>20:15</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>PVG</AirportCode>
                <AirportName>浦東機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>22:25</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1883</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>330</Code>
                <Name>330</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="A">A</ClassOfService>
                <ClassOfService Status="S">B</ClassOfService>
                <ClassOfService Status="S">E</ClassOfService>
                <ClassOfService Status="A">F</ClassOfService>
                <ClassOfService Status="S">G</ClassOfService>
                <ClassOfService Status="S">H</ClassOfService>
                <ClassOfService Status="S">K</ClassOfService>
                <ClassOfService Status="S">L</ClassOfService>
                <ClassOfService Status="S">M1</ClassOfService>
                <ClassOfService Status="S">N</ClassOfService>
                <ClassOfService Status="S">O</ClassOfService>
                <ClassOfService Status="S">Q</ClassOfService>
                <ClassOfService Status="S">S</ClassOfService>
                <ClassOfService Status="S">T</ClassOfService>
                <ClassOfService Status="A">U</ClassOfService>
                <ClassOfService Status="S">V1</ClassOfService>
                <ClassOfService Status="4">X</ClassOfService>
                <ClassOfService Status="A">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>20:15</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>PVG</AirportCode>
                <AirportName>浦東機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>22:25</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber Suffix="A">1883</FlightNumber>
              </Carrier>
              <Equipment>
                <Code>330</Code>
                <Name>330</Name>
              </Equipment>
              <NumberOfStops>0</NumberOfStops>
              <Meals>B</Meals>
              <Frequency />
              <ElectronicTicketing>Y</ElectronicTicketing>
              <LegMiles />
              <Classes>
                <ClassOfService Status="R">A</ClassOfService>
                <ClassOfService Status="R">B</ClassOfService>
                <ClassOfService Status="R">E</ClassOfService>
                <ClassOfService Status="R">F</ClassOfService>
                <ClassOfService Status="R">G</ClassOfService>
                <ClassOfService Status="R">H</ClassOfService>
                <ClassOfService Status="R">K</ClassOfService>
                <ClassOfService Status="R">L</ClassOfService>
                <ClassOfService Status="R">M1</ClassOfService>
                <ClassOfService Status="R">N</ClassOfService>
                <ClassOfService Status="R">O</ClassOfService>
                <ClassOfService Status="R">Q</ClassOfService>
                <ClassOfService Status="R">S</ClassOfService>
                <ClassOfService Status="R">T</ClassOfService>
                <ClassOfService Status="R">U</ClassOfService>
                <ClassOfService Status="R">V1</ClassOfService>
                <ClassOfService Status="R">X</ClassOfService>
                <ClassOfService Status="R">Y</ClassOfService>
              </Classes>
            </Segment>
          </Flight>
          <Flight>
            <Segment>
              <Departure>
                <AirportCode>PEK</AirportCode>
                <AirportName>首都機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>20:30</Time>
                <Terminal>T3</Terminal>
              </Departure>
              <Arrival>
                <AirportCode>SHA</AirportCode>
                <AirportName>虹橋機場</AirportName>
                <Date>2014-04-25</Date>
                <Time>22:40</Time>
                <Terminal>T2</Terminal>
              </Arrival>
              <Carrier>
                <AirlineCode>CA</AirlineCode>
                <AirlineName>CA</AirlineName>
                <FlightNumber>1589</FlightNumber>
              </Carrier>