I have an XML file that looks like this:
<country>
<routes>
<SourceCountry>Ireland</SourceCountry>
<SourcePort>Larne</SourcePort>
<DestinationCountry>UK</DestinationCountry>
<DestinationPort>Troon </DestinationPort>
</routes>
<routes>
<SourceCountry>Ireland</SourceCountry>
<SourcePort>Larne</SourcePort>
<DestinationCountry>UK</DestinationCountry>
<DestinationPort>Cairnryan </DestinationPort>
</routes>
<routes>
<SourceCountry>Ireland</SourceCountry>
<SourcePort>Belfast</SourcePort>
<DestinationCountry>UK</DestinationCountry>
<DestinationPort>Birkenhead </DestinationPort>
</routes>
<routes>
<SourceCountry>Ireland</SourceCountry>
<SourcePort>Belfast</SourcePort>
<DestinationCountry>Belgium</DestinationCountry>
<DestinationPort>Heysham </DestinationPort>
</routes>
<routes>
<SourceCountry>Belgium</SourceCountry>
<SourcePort>Warrenpoint</SourcePort>
<DestinationCountry>UK</DestinationCountry>
<DestinationPort>Heysham </DestinationPort>
</routes>
I want parse particular data for <SourceCountry> == Ireland and <DestinationCountry> == UK
. How can I do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…