London: European shares traded near record highs on Wednesday as investors assessed corporate earnings and awaited key US inflation data, while escalating geopolitical tensions supported gains in defence and energy stocks.The pan-European STOXX 600 index was little changed at 660.17 points by 0837 GMT, remaining close to the record high reached on Monday and bringing its gains for the year to nearly 12%.Investors remained focused on developments in the Middle East, where continuing conflict and uncertainty over a potential US-Iran agreement have fueled concerns about energy supplies and global trade.Brent crude rose 0.6% to $89.45 a barrel, supported by fresh attacks on shipping in the region and fading hopes of a near-term resolution to the Iran conflict.The war, now in its sixth month, has continued despite repeated assertions by US President Donald Trump that an agreement could be reached soon.Defence and energy stocks advanceThe aerospace and defence sector led gains across Europe, rising 0.9%, as investors sought exposure to companies that could benefit from heightened geopolitical risks.The energy sector also gained 0.9%, supported by stronger oil prices.Analysts at UBS Global Wealth Management said Europe's dependence on imported energy leaves regional markets more exposed to disruptions than the United States."The rally has continued despite uncertainty over efforts to resolve the U.S.-Iran conflict. Europe is more vulnerable than the U.S. to disruption in global energy markets because of its greater reliance on imported energy markets," UBS analysts said in a note."But even after the market's strong gains, we believe European equities have further upside potential."Additional geopolitical developments also drew investors' attention after North Korea launched a ballistic missile toward waters off its east coast and Taiwan protested planned Chinese naval exercises near the island.Focus shifts to US inflationMarkets were also preparing for the release of US Consumer Price Index (CPI) data later in the day, which could influence expectations for the Federal Reserve's policy meeting next month.While the report is not expected to fully reflect the recent rise in energy prices, investors are looking for signals on the future direction of US interest rates.According to CME's FedWatch tool, markets are currently pricing roughly an even chance of a rate increase at the next Federal Reserve meeting.Luxury and healthcare stocks lagAmong sector decliners, the luxury goods sector fell 2%, making it the worst-performing segment of the STOXX 600.Healthcare stocks also weakened, losing 1.3%.Earnings drive major moversSeveral stocks posted strong gains following corporate updates.Balfour Beatty surged 9% after the UK construction group raised its annual operating profit forecast, citing strong infrastructure demand in both the United States and Britain.Vestas jumped 18.1% after the Danish wind turbine manufacturer upgraded its full-year earnings margin outlook.German warship builder TKMS gained 14.6% after raising its guidance for the second time in six months.Irish building materials company Kingspan advanced 6.5% after announcing plans to acquire power management systems manufacturer BMC Manufacturing for an upfront payment of €850 million ($981 million) on a debt-free, cash-free basis.