<p>
рездел1: <code>1111<br class="inline"></code>
рездел2: <strong>222<br class="inline"></strong>
рездел3: <code>333<br class="inline"></code>
рездел4: <strong>4444<br class="inline"></strong>
</p>
p/code[normalize-space(preceding-sibling::text()[1]) = 'рездел1:']/text()
p/strong[normalize-space(preceding-sibling::text()[1]) = 'рездел2:']/text()